removed new metrics
This commit is contained in:
parent
b9968c7a72
commit
f33bc3a2ca
2 changed files with 3 additions and 77 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{% 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" %}
|
||||
{% set id_check = "('GOVERNMENTID')" %}
|
||||
|
||||
{{ config(materialized="table", unique_key=["date", "id_deal", "has_id_check"]) }}
|
||||
|
||||
|
|
@ -29,17 +29,6 @@ select
|
|||
else null
|
||||
end
|
||||
) as deposit_fees_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when
|
||||
upper(icvp.verification_payment_type)
|
||||
in {{ deposit_fees_verification_payment_type_items }}
|
||||
and upper(icb.booking_state) <> {{ var("cancelled_booking_state") }}
|
||||
and icb.id_booking is not null
|
||||
then icvp.amount_without_taxes_in_gbp
|
||||
else null
|
||||
end
|
||||
) as deposit_fees_not_cancelled_bookings_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when
|
||||
|
|
@ -49,17 +38,6 @@ select
|
|||
else null
|
||||
end
|
||||
) as waiver_payments_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when
|
||||
upper(icvp.verification_payment_type)
|
||||
in {{ waiver_fees_verification_payment_type_items }}
|
||||
and upper(icb.booking_state) <> {{ var("cancelled_booking_state") }}
|
||||
and icb.id_booking is not null
|
||||
then icvp.amount_without_taxes_in_gbp
|
||||
else null
|
||||
end
|
||||
) as waiver_payments_not_cancelled_bookings_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when
|
||||
|
|
@ -69,17 +47,6 @@ select
|
|||
else null
|
||||
end
|
||||
) as checkin_cover_fees_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when
|
||||
upper(icvp.verification_payment_type)
|
||||
in {{ checkin_cover_fees_verification_payment_type_items }}
|
||||
and upper(icb.booking_state) <> {{ var("cancelled_booking_state") }}
|
||||
and icb.id_booking is not null
|
||||
then icvp.amount_without_taxes_in_gbp
|
||||
else null
|
||||
end
|
||||
) as checkin_cover_fees_not_cancelled_bookings_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when
|
||||
|
|
@ -92,24 +59,7 @@ select
|
|||
then icvp.amount_without_taxes_in_gbp
|
||||
else null
|
||||
end
|
||||
) as total_guest_payments_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when
|
||||
(
|
||||
upper(icvp.verification_payment_type)
|
||||
in {{ checkin_cover_fees_verification_payment_type_items }}
|
||||
or upper(icvp.verification_payment_type)
|
||||
in {{ waiver_fees_verification_payment_type_items }}
|
||||
or upper(icvp.verification_payment_type)
|
||||
in {{ deposit_fees_verification_payment_type_items }}
|
||||
)
|
||||
and upper(icb.booking_state) <> {{ var("cancelled_booking_state") }}
|
||||
and icb.id_booking is not null
|
||||
then icvp.amount_without_taxes_in_gbp
|
||||
else null
|
||||
end
|
||||
) as total_guest_payments_not_cancelled_in_gbp
|
||||
) as total_guest_payments_in_gbp
|
||||
from {{ ref("int_core__verification_payments", version=2) }} as icvp
|
||||
left join
|
||||
{{ ref("int_core__verification_requests") }} as icvr
|
||||
|
|
@ -120,7 +70,7 @@ left join
|
|||
left join
|
||||
{{ ref("stg_core__verification") }} as icv
|
||||
on icv.id_verification_request = icvr.id_verification_request
|
||||
and icv.verification = '{{ id_check }}'
|
||||
and upper(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
|
||||
|
|
|
|||
|
|
@ -1863,48 +1863,24 @@ models:
|
|||
Sum of deposit fees paid by guests, without taxes, in GBP
|
||||
in a given date and per specified dimension.
|
||||
|
||||
- name: deposit_fees_not_cancelled_bookings_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of deposit fees associated to bookings, that are not cancelled, paid by guests,
|
||||
without taxes, in GBP in a given date and per specified dimension.
|
||||
|
||||
- name: waiver_payments_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of waiver payments paid by guests, without taxes, in GBP
|
||||
in a given date and per specified dimension.
|
||||
|
||||
- name: waiver_payments_not_cancelled_bookings_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of waiver payments associated to bookings, that are not cancelled, paid by guests,
|
||||
without taxes, in GBP in a given date and per specified dimension.
|
||||
|
||||
- name: checkin_cover_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of checkin cover fees paid by guests, without taxes, in GBP
|
||||
in a given date and per specified dimension.
|
||||
|
||||
- name: checkin_cover_fees_not_cancelled_bookings_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of checkin cover fees associated to bookings, that are not cancelled, paid by guests,
|
||||
without taxes, in GBP in a given date and per specified dimension.
|
||||
|
||||
- name: total_guest_payments_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of total payments paid by guests, without taxes, in GBP
|
||||
in a given date and per specified dimension.
|
||||
|
||||
- name: total_guest_payment_not_cancelled_bookings_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of total payments associated to bookings, that are not cancelled, paid by guests,
|
||||
without taxes, in GBP in a given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__metric_monthly_guest_payments
|
||||
description: |
|
||||
This model computes the Monthly Guest Payments at the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue