From bf1e125856485b49cf90d7e166d77103b9e9b9ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Roqu=C3=A9=20Paniagua?= Date: Thu, 13 Mar 2025 12:25:13 +0000 Subject: [PATCH] Merged PR 4687: Bugfix - Removal of SH fields that no longer exist # Description After the sync this morning in Core in Airbyte, we have some issues in SH User. This attempts to remove no longer existing fields, namely: - id_airbnb - airbnb_url - platform_comms_recipient # 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. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] 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: #28502 --- models/intermediate/core/int_core__unified_user.sql | 3 --- models/intermediate/core/schema.yml | 10 ---------- models/reporting/core/core__unified_user.sql | 6 +++--- models/staging/core/stg_core__superhog_user.sql | 3 --- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/models/intermediate/core/int_core__unified_user.sql b/models/intermediate/core/int_core__unified_user.sql index 6184366..f024d12 100644 --- a/models/intermediate/core/int_core__unified_user.sql +++ b/models/intermediate/core/int_core__unified_user.sql @@ -36,8 +36,6 @@ select u.access_failed_count, u.lockout_end_date_utc, su.avatar, - su.id_airbnb, - su.airbnb_url, su.created_at_utc, su.created_date_utc, su.updated_at_utc, @@ -47,7 +45,6 @@ select su.flag_as_problem, su.number_of_properties, su.id_superhog_verified_set, - su.platform_comms_recipient, su.id_user_verification_status, case when act.account_type_name in {{ test_account_type_name }} diff --git a/models/intermediate/core/schema.yml b/models/intermediate/core/schema.yml index 27d267a..aa7d896 100644 --- a/models/intermediate/core/schema.yml +++ b/models/intermediate/core/schema.yml @@ -270,12 +270,6 @@ models: - name: avatar data_type: character varying description: The avatar of the user. - - name: id_airbnb - data_type: character varying - description: The ID of the Airbnb. - - name: airbnb_url - data_type: character varying - description: The Airbnb URL. - name: created_at_utc data_type: timestamp description: The timestamp when the user was created. @@ -308,10 +302,6 @@ models: - name: id_superhog_verified_set data_type: bigint description: The ID of the Superhog verified set. - - name: platform_comms_recipient - data_type: boolean - description: | - True if the user is a platform comms recipient. False otherwise. - name: id_user_verification_status data_type: bigint description: The ID of the user verification status. diff --git a/models/reporting/core/core__unified_user.sql b/models/reporting/core/core__unified_user.sql index 4efc1c5..2bf04aa 100644 --- a/models/reporting/core/core__unified_user.sql +++ b/models/reporting/core/core__unified_user.sql @@ -24,8 +24,8 @@ select access_failed_count as access_failed_count, lockout_end_date_utc as lockout_end_date_utc, avatar as avatar, - id_airbnb as id_airbnb, - airbnb_url as airbnb_url, + null as id_airbnb, + null as airbnb_url, created_at_utc as created_at_utc, created_date_utc as created_date_utc, updated_at_utc as updated_at_utc, @@ -35,7 +35,7 @@ select flag_as_problem as flag_as_problem, number_of_properties as number_of_properties, id_superhog_verified_set as id_superhog_verified_set, - platform_comms_recipient as platform_comms_recipient, + null as platform_comms_recipient, null as other_sharing_platform_url, id_user_verification_status as id_user_verification_status from core__unified_user diff --git a/models/staging/core/stg_core__superhog_user.sql b/models/staging/core/stg_core__superhog_user.sql index 46b5a3a..1697f66 100644 --- a/models/staging/core/stg_core__superhog_user.sql +++ b/models/staging/core/stg_core__superhog_user.sql @@ -11,8 +11,6 @@ with stg_core__superhog_user as ( select {{ adapter.quote("Avatar") }} as avatar, - {{ adapter.quote("AirbnbId") }} as id_airbnb, - {{ adapter.quote("AirbnbUrl") }} as airbnb_url, {{ adapter.quote("CreatedDate") }} as created_at_utc, date({{ adapter.quote("CreatedDate") }}) as created_date_utc, {{ adapter.quote("UpdatedDate") }} as updated_at_utc, @@ -23,7 +21,6 @@ with lower({{ adapter.quote("SuperhogUserId") }}) as id_superhoguser, {{ adapter.quote("NumberOfProperties") }} as number_of_properties, {{ adapter.quote("SuperhogVerifiedSetId") }} id_superhog_verified_set, - {{ adapter.quote("PlatformCommsRecipient") }} as platform_comms_recipient, {{ adapter.quote("UserVerificationStatusId") }} as id_user_verification_status, {{ adapter.quote("_airbyte_extracted_at") }} as dwh_loaded_at_date