wip
This commit is contained in:
parent
9fecfeb91b
commit
f5addc7f4c
1 changed files with 12 additions and 1 deletions
|
|
@ -1,13 +1,17 @@
|
|||
{% set deposit_fees_verification_payment_type_items = "('FEE')" %}
|
||||
{% set waiver_fees_verification_payment_type_items = "('WAIVER')" %}
|
||||
{% set checkin_cover_fees_verification_payment_type_items = "('CHECKINCOVER')" %}
|
||||
{% set id_check = "GovernmentId" %}
|
||||
|
||||
{{ config(materialized="table", unique_key=["date", "id_deal"]) }}
|
||||
{{ config(materialized="table", unique_key=["date", "id_deal", "has_id_check"]) }}
|
||||
|
||||
select
|
||||
-- Unique Key --
|
||||
icvp.payment_paid_date_utc as date,
|
||||
coalesce(icuh.id_deal, 'UNSET') as id_deal,
|
||||
case
|
||||
when v.id_verification is null then 'W/O Id Check' else 'With Id Check'
|
||||
end as has_id_check,
|
||||
-- Dimensions --
|
||||
coalesce(
|
||||
icd.main_billing_country_iso_3_per_deal, 'UNSET'
|
||||
|
|
@ -60,6 +64,13 @@ from {{ ref("int_core__verification_payments", version=2) }} as icvp
|
|||
left join
|
||||
{{ ref("int_core__verification_requests") }} as icvr
|
||||
on icvp.id_verification_request = icvr.id_verification_request
|
||||
left join
|
||||
{{ ref("int_core__bookings") }} as icb
|
||||
on icb.id_verification_request = icvr.id_verification_request
|
||||
left join
|
||||
{{ ref("stg_core__verification") }} as icv
|
||||
on icv.id_verification_request = icvr.id_verification_request
|
||||
and icv.verification = '{{ id_check }}'
|
||||
left join
|
||||
{{ ref("int_core__user_host") }} as icuh on icvr.id_user_host = icuh.id_user_host
|
||||
left join {{ ref("int_core__deal") }} as icd on icuh.id_deal = icd.id_deal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue