Merged PR 2005: Replace Guest Details in CheckIn Cover models with details coming from User table
Fixes https://guardhog.visualstudio.com/Data/_boards/board/t/Data%20Team/Stories/?workitem=17240 Related work items: #17240
This commit is contained in:
parent
d18b47f597
commit
366aa7d1ac
3 changed files with 19 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ with
|
||||||
int_core__check_in_cover_prices as (
|
int_core__check_in_cover_prices as (
|
||||||
select * from {{ ref("int_core__check_in_cover_prices") }}
|
select * from {{ ref("int_core__check_in_cover_prices") }}
|
||||||
),
|
),
|
||||||
|
int_core__unified_user as (select * from {{ ref("int_core__unified_user") }}),
|
||||||
check_in_cover_payments as (
|
check_in_cover_payments as (
|
||||||
select
|
select
|
||||||
id_verification_request,
|
id_verification_request,
|
||||||
|
|
@ -49,10 +50,10 @@ select
|
||||||
vr.callback_url,
|
vr.callback_url,
|
||||||
vr.redirect_url,
|
vr.redirect_url,
|
||||||
vr.logo,
|
vr.logo,
|
||||||
vr.guest_email,
|
gu.email as guest_email,
|
||||||
vr.last_name,
|
gu.last_name as last_name,
|
||||||
vr.first_name,
|
gu.first_name as first_name,
|
||||||
vr.guest_phone_number,
|
gu.phone_number as guest_phone_number,
|
||||||
vr.telephone_code,
|
vr.telephone_code,
|
||||||
vr.guest_phone_number_2,
|
vr.guest_phone_number_2,
|
||||||
b.check_in_at_utc,
|
b.check_in_at_utc,
|
||||||
|
|
@ -101,6 +102,7 @@ left join
|
||||||
check_in_cover_payments p on vr.id_verification_request = p.id_verification_request
|
check_in_cover_payments p on vr.id_verification_request = p.id_verification_request
|
||||||
left join
|
left join
|
||||||
int_core__check_in_cover_prices ccp on p.currency = ccp.local_currency_iso_4217
|
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
|
||||||
-- 15 is Check-in cover.
|
-- 15 is Check-in cover.
|
||||||
-- Adding this condition results in only keeping guest journeys that offered the
|
-- Adding this condition results in only keeping guest journeys that offered the
|
||||||
-- check-in cover
|
-- check-in cover
|
||||||
|
|
|
||||||
|
|
@ -133,3 +133,13 @@ models:
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
- unique
|
- unique
|
||||||
|
|
||||||
|
- name: int_core__vr_check_in_cover
|
||||||
|
columns:
|
||||||
|
- name: id_verification_request
|
||||||
|
data_type: character varying
|
||||||
|
description: The unique ID for the verification request.
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
- unique
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,9 @@ models:
|
||||||
description: |
|
description: |
|
||||||
Unique, incremental, internal ID for the related verification
|
Unique, incremental, internal ID for the related verification
|
||||||
request.
|
request.
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
- unique
|
||||||
|
|
||||||
- name: uuid_verification_request
|
- name: uuid_verification_request
|
||||||
data_type: text
|
data_type: text
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue