duplicate athena verifications
This commit is contained in:
parent
67b8e1263d
commit
30c73b1ab9
3 changed files with 61 additions and 14 deletions
49
models/intermediate/athena/int_athena__verifications.sql
Normal file
49
models/intermediate/athena/int_athena__verifications.sql
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
with
|
||||
stg_edeposit__verifications as (
|
||||
select * from {{ ref("stg_edeposit__verifications") }}
|
||||
)
|
||||
select
|
||||
-- note that these ids are not the same as the ones found in Core DWH
|
||||
-- they are completely unrelated
|
||||
id_verification,
|
||||
id_booking,
|
||||
id_user_partner,
|
||||
id_accommodation,
|
||||
version,
|
||||
case when version = 'V1' then 'Guesty' else null end as verification_source,
|
||||
verification_status,
|
||||
nightly_fee_local,
|
||||
cast(checkout_at_utc as date) - cast(checkin_at_utc as date) as number_nights,
|
||||
email_flag,
|
||||
phone_flag,
|
||||
watch_list,
|
||||
channel,
|
||||
checkin_at_utc,
|
||||
cast(checkin_at_utc as date) as checkin_date_utc,
|
||||
checkout_at_utc,
|
||||
cast(checkout_at_utc as date) as checkout_date_utc,
|
||||
is_cancelled,
|
||||
cancelled_at_utc,
|
||||
cast(cancelled_at_utc as date) as cancelled_date_utc,
|
||||
user_email,
|
||||
guest_email,
|
||||
guest_last_name,
|
||||
guest_first_name,
|
||||
guest_telephone,
|
||||
company_name,
|
||||
property_manager_name,
|
||||
property_manager_email,
|
||||
listing_name,
|
||||
listing_town,
|
||||
listing_country,
|
||||
listing_postcode,
|
||||
pets_allowed,
|
||||
status_updated_at_utc,
|
||||
status_updated_date_utc,
|
||||
updated_at_utc,
|
||||
athena_creation_at_utc,
|
||||
athena_creation_date_utc,
|
||||
created_at_utc,
|
||||
created_date_utc
|
||||
from stg_edeposit__verifications
|
||||
where version = 'V1'
|
||||
Loading…
Add table
Add a link
Reference in a new issue