Merged PR 3506: Remove Address Validation
# Description Removes Address Validation within DWH. Note that I keep the 2 reporting fields, nullified. These should be removed after the removal of these fields in PBI. # Checklist - [X] The edited models and dependants run properly with production data. - [NA] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [NA] I have checked for DRY opportunities with other models and docs. - [NA] 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: #23976
This commit is contained in:
parent
3b822a2ea5
commit
321f48ca7d
8 changed files with 1 additions and 165 deletions
|
|
@ -1,25 +0,0 @@
|
|||
with
|
||||
stg_core__address_validation as (
|
||||
select * from {{ ref("stg_core__address_validation") }}
|
||||
),
|
||||
stg_core__verification_to_address_validation as (
|
||||
select * from {{ ref("stg_core__verification_to_address_validation") }}
|
||||
),
|
||||
stg_core__verification as (select * from {{ ref("stg_core__verification") }})
|
||||
select
|
||||
av.id_address_validation as id_address_validation,
|
||||
vtav.id_verification as id_verification,
|
||||
v.id_verification_request as id_verification_request,
|
||||
av.id_accommodation as id_accommodation,
|
||||
av.validation_passed as validation_passed,
|
||||
av.feature_size_meters as feature_size_meters,
|
||||
av.feature_size_meters_upper_limit as feature_size_meters_upper_limit,
|
||||
av.notes as notes,
|
||||
av.created_at_utc as created_at_utc,
|
||||
av.updated_at_utc as updated_at_utc,
|
||||
av.dwh_extracted_at_utc as dwh_extracted_at_utc
|
||||
from stg_core__address_validation av
|
||||
left join
|
||||
stg_core__verification_to_address_validation vtav
|
||||
on av.id_address_validation = vtav.id_address_validation
|
||||
left join stg_core__verification v on v.id_verification = vtav.id_verification
|
||||
|
|
@ -24,9 +24,6 @@ with
|
|||
where
|
||||
verification_payment_type = 'CheckInCover' -- 5 is check-in cover
|
||||
and payment_status in ('Paid', 'Refunded')
|
||||
),
|
||||
int_core__address_validations as (
|
||||
select * from {{ ref("int_core__address_validations") }}
|
||||
)
|
||||
select
|
||||
vr.id_verification_request,
|
||||
|
|
@ -48,8 +45,6 @@ select
|
|||
and vr.is_verification_request_complete
|
||||
) as is_awaiting_check_in,
|
||||
p.total_amount_in_txn_currency is not null as cover_was_purchased,
|
||||
av.validation_passed as address_validation_passed,
|
||||
av.notes as address_validation_notes,
|
||||
(
|
||||
p.total_amount_in_txn_currency is null and vr.is_verification_request_complete
|
||||
) as cover_was_rejected,
|
||||
|
|
@ -112,9 +107,6 @@ left join
|
|||
left join
|
||||
int_core__check_in_cover_prices ccp on p.currency = ccp.local_currency_iso_4217
|
||||
left join int_core__unified_user gu on gu.id_user = vr.id_user_guest
|
||||
left join
|
||||
int_core__address_validations av
|
||||
on av.id_verification_request = vr.id_verification_request
|
||||
-- 15 is Check-in cover.
|
||||
-- Adding this condition results in only keeping guest journeys that offered the
|
||||
-- check-in cover
|
||||
|
|
|
|||
|
|
@ -239,15 +239,6 @@ models:
|
|||
data_type: boolean
|
||||
description: "Boolean to indicate if the cover was purchased by the guest or not."
|
||||
|
||||
- name: address_validation_passed
|
||||
data_type: boolean
|
||||
description: "Boolean to indicate if the validation was approved or not.
|
||||
In case there was a problem with the validation it will be Null"
|
||||
|
||||
- name: address_validation_notes
|
||||
data_type: character varying
|
||||
description: "Notes in case there was some problem with the validation."
|
||||
|
||||
- name: cover_was_rejected
|
||||
data_type: boolean
|
||||
description: ""
|
||||
|
|
@ -1945,67 +1936,6 @@ models:
|
|||
has moved from Old Dash, it will be the new_dash_move_at_utc.
|
||||
If not, it will correspond to the joined_at_utc.
|
||||
|
||||
- name: int_core__address_validations
|
||||
description:
|
||||
"This tables contains records on address validation for Check-in Hero
|
||||
purchases by guests.
|
||||
The cover validation can pass or be rejected"
|
||||
columns:
|
||||
- name: id_address_validation
|
||||
data_type: bigint
|
||||
description: "Id of the address validation."
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
- name: id_verification
|
||||
data_type: bigint
|
||||
description: "Id of the verification."
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
- name: id_verification_request
|
||||
data_type: bigint
|
||||
description: "Id of the verification request."
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
- name: id_accommodation
|
||||
data_type: bigint
|
||||
description: "Id of the accommodation or listing."
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: validation_passed
|
||||
data_type: boolean
|
||||
description: "Boolean to indicate if the validation was approved or not."
|
||||
|
||||
- name: feature_size_meters
|
||||
data_type: numeric
|
||||
description: ""
|
||||
|
||||
- name: feature_size_meters_upper_limit
|
||||
data_type: numeric
|
||||
description: ""
|
||||
|
||||
- name: notes
|
||||
data_type: character varying
|
||||
description: "Notes in case there was some problem with the validation."
|
||||
|
||||
- name: created_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: "Date and time at which the validation was created."
|
||||
|
||||
- name: updated_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: "Date and time at which the validation was last updated."
|
||||
|
||||
- name: dwh_extracted_at_utc
|
||||
data_type: timestamp with time zone
|
||||
description: "Date and time at which the record was extracted from the backend into the DWH."
|
||||
|
||||
- name: int_core__user_product_bundle
|
||||
description: |
|
||||
This model contains the relationship of a User has a Product Bundle. It contains
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ select
|
|||
is_past_check_in as is_past_check_in,
|
||||
is_awaiting_check_in as is_awaiting_check_in,
|
||||
cover_was_purchased as cover_was_purchased,
|
||||
address_validation_passed as address_validation_passed,
|
||||
address_validation_notes as address_validation_notes,
|
||||
cover_was_rejected as cover_was_rejected,
|
||||
guest_email as guest_email,
|
||||
last_name as last_name,
|
||||
|
|
|
|||
|
|
@ -303,15 +303,6 @@ models:
|
|||
This is identified by the fact that there is a payment of type
|
||||
check-in cover associated with this guest journey.
|
||||
|
||||
- name: address_validation_passed
|
||||
data_type: boolean
|
||||
description: "Boolean to indicate if the validation was approved or not.
|
||||
In case there was a problem with the validation it will be Null"
|
||||
|
||||
- name: address_validation_notes
|
||||
data_type: character varying
|
||||
description: "Notes in case there was some problem with the validation."
|
||||
|
||||
- name: cover_was_rejected
|
||||
data_type: boolean
|
||||
description: |
|
||||
|
|
|
|||
|
|
@ -172,22 +172,7 @@ models:
|
|||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
- name: stg_core__address_validation
|
||||
columns:
|
||||
- name: id_address_validation
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
- name: stg_core__verification_to_address_validation
|
||||
columns:
|
||||
- name: id_verification
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
- name: id_address_validation
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
- name: stg_core__accommodation_to_product_bundle
|
||||
columns:
|
||||
- name: id_accommodation_to_product_bundle
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
with
|
||||
raw_address_validation as (select * from {{ source("core", "AddressValidation") }}),
|
||||
stg_core__address_validation as (
|
||||
select
|
||||
{{ adapter.quote("Id") }} as id_address_validation,
|
||||
{{ adapter.quote("AccommodationId") }} as id_accommodation,
|
||||
{{ adapter.quote("Passed") }} as validation_passed,
|
||||
{{ adapter.quote("FeatureSizeMeters") }} as feature_size_meters,
|
||||
{{ adapter.quote("FeatureSizeMetersUpperLimit") }}
|
||||
as feature_size_meters_upper_limit,
|
||||
{{ adapter.quote("Notes") }} as notes,
|
||||
{{ adapter.quote("CreatedDate") }} as created_at_utc,
|
||||
{{ adapter.quote("UpdatedDate") }} as updated_at_utc,
|
||||
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
|
||||
|
||||
from raw_address_validation
|
||||
)
|
||||
select *
|
||||
from stg_core__address_validation
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
with
|
||||
raw_verification_to_address_validation as (
|
||||
select * from {{ source("core", "VerificationToAddressValidation") }}
|
||||
),
|
||||
stg_core__verification_to_address_validation as (
|
||||
select
|
||||
{{ adapter.quote("VerificationId") }} as id_verification,
|
||||
{{ adapter.quote("AddressValidationId") }} as id_address_validation,
|
||||
{{ adapter.quote("CreatedDate") }} as created_at_utc,
|
||||
{{ adapter.quote("UpdatedDate") }} as updated_at_utc,
|
||||
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
|
||||
|
||||
from raw_verification_to_address_validation
|
||||
)
|
||||
select *
|
||||
from stg_core__verification_to_address_validation
|
||||
Loading…
Add table
Add a link
Reference in a new issue