Merged PR 2029: Guest Journey - start date based on used link
Added verification estimated started at/date utc. Ensured continuity for existing reports I also noticed I missed one propagation of the end date, it's fixed here. Note: changed the naming from 'start' to 'started' since we already had 'completed' and 'used_link' Related work items: #17268
This commit is contained in:
parent
7914d7d8d7
commit
4f6728003a
4 changed files with 13 additions and 14 deletions
|
|
@ -12,7 +12,7 @@ with
|
|||
when pp.price_plan_charged_by_type = 'CheckInDate'
|
||||
then b.check_in_at_utc
|
||||
when pp.price_plan_charged_by_type in ('VerificationStartDate', 'All')
|
||||
then vr.verification_start_at_utc
|
||||
then vr.verification_estimated_started_at_utc
|
||||
end as booking_fee_charge_at_utc
|
||||
from stg_core__booking b
|
||||
left join
|
||||
|
|
@ -30,7 +30,7 @@ with
|
|||
then
|
||||
coalesce(
|
||||
(
|
||||
vr.verification_start_at_utc
|
||||
vr.verification_estimated_started_at_utc
|
||||
between pp.start_at_utc and pp.end_at_utc
|
||||
),
|
||||
false
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ with
|
|||
stg_core__verification_request as (
|
||||
select * from {{ ref("stg_core__verification_request") }}
|
||||
),
|
||||
int_core__unified_user as (select * from {{ ref("int_core__unified_user") }}),
|
||||
int_core__verification_request_completeness as (
|
||||
select * from {{ ref("int_core__verification_request_completeness") }}
|
||||
),
|
||||
|
|
@ -29,8 +28,8 @@ select
|
|||
vr.guest_phone_number,
|
||||
vr.telephone_code,
|
||||
vr.guest_phone_number_2,
|
||||
guest.joined_at_utc as verification_start_at_utc,
|
||||
guest.joined_date_utc as verification_start_date_utc,
|
||||
vr.link_used_at_utc as verification_estimated_started_at_utc,
|
||||
vr.link_used_date_utc as verification_estimated_started_date_utc,
|
||||
vrcd.estimated_completed_at_utc as verification_estimated_completed_at_utc,
|
||||
vrcd.estimated_completed_date_utc as verification_estimated_completed_date_utc,
|
||||
vr.link_used_at_utc,
|
||||
|
|
@ -53,9 +52,9 @@ select
|
|||
vr.updated_date_utc,
|
||||
vr.dwh_extracted_at_utc
|
||||
from stg_core__verification_request vr
|
||||
left join int_core__unified_user guest on vr.id_user_guest = guest.id_user
|
||||
left join
|
||||
int_core__verification_request_completeness completeness
|
||||
on vr.id_verification_request = completeness.id_verification_request
|
||||
left join int_core__verification_request_completed_date vrcd
|
||||
on vr.id_verification_request = vrcd.id_verification_request
|
||||
left join
|
||||
int_core__verification_request_completed_date vrcd
|
||||
on vr.id_verification_request = vrcd.id_verification_request
|
||||
|
|
|
|||
|
|
@ -60,10 +60,10 @@ select
|
|||
b.check_in_date_utc,
|
||||
b.check_out_at_utc,
|
||||
b.check_out_date_utc,
|
||||
vr.verification_start_at_utc,
|
||||
vr.verification_start_date_utc,
|
||||
vr.verification_end_at_utc,
|
||||
vr.verification_end_date_utc,
|
||||
vr.verification_estimated_started_at_utc as verification_start_at_utc,
|
||||
vr.verification_estimated_started_date_utc as verification_start_date_utc,
|
||||
vr.verification_estimated_completed_at_utc as verification_end_at_utc,
|
||||
vr.verification_estimated_completed_date_utc as verification_end_date_utc,
|
||||
vr.link_used_at_utc,
|
||||
vr.link_used_date_utc,
|
||||
vr.expire_at_utc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue