Merged PR 2629: Integrates logic to detect New Dashboard users within DWH
# Description First step towards reporting New Dash is to be able within DWH to know which hosts have been migrated. In order to do so, and anticipating that there's going to be new phases in the future, I've created a `int_core__user_migration` model that reads from a configuration macro `get_new_dash_migration_phases_config` that will allow semi-automatic user retrieval in the future. This avoids nasty hardcoding within the model itself. The information of whether a user is migrated, in which phase and when the phase was deployed is available at user level in the `int_core__user_host` table. # Checklist - [X] The edited models and dependants run properly with production data. - [X] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [X] I have checked for DRY opportunities with other models and docs. - [X] I've picked the right materialization for the affected models. **-> I selected a view for this model since I don't believe we should materialse this data other than the user host table** # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #19570
This commit is contained in:
parent
3d09d04068
commit
c8f4d2be70
4 changed files with 129 additions and 1 deletions
|
|
@ -2160,6 +2160,53 @@ models:
|
|||
description: |
|
||||
Date of the last time the information of the Host was updated
|
||||
in our systems.
|
||||
- name: is_user_migrated
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to determine if this user host has been migrated according
|
||||
to the logic implemented in user_migration table.
|
||||
- name: migration_phase
|
||||
data_type: string
|
||||
description: |
|
||||
The name of the phase this user was first migrated.
|
||||
- name: lower_limit_migration_date_utc
|
||||
data_type: date
|
||||
description: |
|
||||
The date that the deployment of the migration happened.
|
||||
It does not necessarily mean that this user was migrated in
|
||||
this date. This user could have not been migrated before
|
||||
this date.
|
||||
|
||||
- name: int_core__user_migration
|
||||
description: |
|
||||
This table provides information of the host users that have been migrated.
|
||||
At this stage, the main objective is to account for the user migration within
|
||||
the scope of New Dashboard migration.
|
||||
It uses the migration configuration settled in the macro:
|
||||
- user_migration_configuration -> get_new_dash_migration_phases_config
|
||||
|
||||
columns:
|
||||
- name: id_user_host
|
||||
data_type: character varying
|
||||
description: The unique user ID for the Host.
|
||||
tests:
|
||||
- not_null
|
||||
- unique
|
||||
- name: migration_phase
|
||||
data_type: string
|
||||
description: |
|
||||
The name of the phase this user was first migrated.
|
||||
tests:
|
||||
- not_null
|
||||
- name: lower_limit_migration_date_utc
|
||||
data_type: date
|
||||
description: |
|
||||
The date that the deployment of the migration happened.
|
||||
It does not necessarily mean that this user was migrated in
|
||||
this date. This user could have not been migrated before
|
||||
this date.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: int_core__address_validations
|
||||
description:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue