Merged PR 2849: Fix: KYG lite migration with proper date migration handling
# Description This PR fixes the New Dash migration issue that happened on September 10th 2024. In this migration, users were directly assigned the claim of KygMvp that does not contain a date value. We were using a default hardcode of the first MVP migration, thus in DWH all users have been considered to be migrated late July instead of splitting the first 22 in late July and the ~200 others in September. The issue lies in the fact that users have configured a ProductBundle and can have Bookings with ProductBundle BEFORE the migration date, which greatly breaks the logic of a migration monitoring. Changes: * New migration phase added based on the claim MvpMigratedUser, that Ben created on Friday 13th * Adaptation of the code in int_core__user_migration to detect if the claim_value (a text field) has a date or not. If so, use that date as long as it's equal or greater than the deployment date, if not use the deployment date. If the claim does not contain a date, use the deployment date (this is the case for the first true 22 migrated users) I checked that volumes now look correct with this fix. # 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. # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #20773
This commit is contained in:
parent
80a6b225b3
commit
cf1d6e28cc
2 changed files with 31 additions and 9 deletions
|
|
@ -19,14 +19,18 @@ Important note: if a user migrates once a phase has started, we
|
|||
until it's migrated. So this migration date should be considered
|
||||
as a hard, lower-limit of dates.
|
||||
*/
|
||||
|
||||
{% macro get_new_dash_migration_phases_config() %}
|
||||
{% set migration_phases = [
|
||||
{
|
||||
'phase_name': 'MVP',
|
||||
'claim_type': 'KYGMVP',
|
||||
'deployment_date': '2024-07-30'
|
||||
}
|
||||
"phase_name": "MVP",
|
||||
"claim_type": "KYGMVP",
|
||||
"default_deployment_date": "2024-07-30",
|
||||
},
|
||||
{
|
||||
"phase_name": "MVP",
|
||||
"claim_type": "MVPMIGRATEDUSER",
|
||||
"default_deployment_date": "2024-09-10",
|
||||
},
|
||||
] %}
|
||||
{{ return(migration_phases) }}
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue