Merged PR 4336: MTD and Monthly Verification Requests dependant KPIs for Dash Source
# Description Changes: * Adds Dash Source in Monthly and MTD Metric models for Verification Request dependant KPIs * Propagates to Aggregated Monthly and MTD models for VR dependant KPIs * Eliminates unused Weekly Guest Payment models. # Checklist - [X] The edited models and dependants run properly with production data. - [X] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [X] I have checked for DRY opportunities with other models and docs. - [X] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #27356
This commit is contained in:
parent
b471b64d9c
commit
dffb1d5a1e
14 changed files with 169 additions and 256 deletions
|
|
@ -1,27 +0,0 @@
|
|||
{% set dimensions = get_kpi_dimensions_per_model("GUEST_PAYMENTS") %}
|
||||
|
||||
{{
|
||||
config(
|
||||
materialized="table", unique_key=["end_date", "dimension", "dimension_value"]
|
||||
)
|
||||
}}
|
||||
|
||||
|
||||
{% for dimension in dimensions %}
|
||||
select
|
||||
-- Unique Key --
|
||||
start_date,
|
||||
end_date,
|
||||
{{ dimension.dimension }} as dimension,
|
||||
{{ dimension.dimension_value }} as dimension_value,
|
||||
-- Metrics --
|
||||
sum(deposit_fees_in_gbp) as deposit_fees_in_gbp,
|
||||
sum(waiver_payments_in_gbp) as waiver_payments_in_gbp,
|
||||
sum(checkin_cover_fees_in_gbp) as checkin_cover_fees_in_gbp,
|
||||
sum(total_guest_payments_in_gbp) as total_guest_payments_in_gbp
|
||||
from {{ ref("int_kpis__metric_weekly_guest_payments") }}
|
||||
group by 1, 2, 3, 4
|
||||
{% if not loop.last %}
|
||||
union all
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gj.id_deal,
|
||||
gj.dash_source,
|
||||
gj.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gj.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -24,4 +26,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_completed_guest_journeys") }} gj
|
||||
on date_trunc('month', gj.date)::date = d.first_day_month
|
||||
where d.is_end_of_month = true and gj.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gj.id_deal,
|
||||
gj.dash_source,
|
||||
gj.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gj.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -24,4 +26,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_created_guest_journeys") }} gj
|
||||
on date_trunc('month', gj.date)::date = d.first_day_month
|
||||
where d.is_end_of_month = true and gj.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gj.id_deal,
|
||||
gj.dash_source,
|
||||
gj.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gj.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -24,4 +26,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_guest_journeys_with_payment") }} gj
|
||||
on date_trunc('month', gj.date)::date = d.first_day_month
|
||||
where d.is_end_of_month = true and gj.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"has_id_check",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
|
|
@ -15,6 +16,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gp.id_deal,
|
||||
gp.dash_source,
|
||||
gp.has_id_check,
|
||||
gp.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
|
|
@ -29,4 +31,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_guest_payments") }} gp
|
||||
on date_trunc('month', gp.date)::date = d.first_day_month
|
||||
where d.is_end_of_month = true and gp.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
group by 1, 2, 3, 4, 5, 6, 7
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gj.id_deal,
|
||||
gj.dash_source,
|
||||
gj.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gj.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -24,4 +26,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_started_guest_journeys") }} gj
|
||||
on date_trunc('month', gj.date)::date = d.first_day_month
|
||||
where d.is_end_of_month = true and gj.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gj.id_deal,
|
||||
gj.dash_source,
|
||||
gj.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gj.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -25,4 +27,4 @@ left join
|
|||
on date_trunc('month', gj.date)::date = d.first_day_month
|
||||
and extract(day from gj.date) <= d.day
|
||||
where d.is_month_to_date = true and gj.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gj.id_deal,
|
||||
gj.dash_source,
|
||||
gj.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gj.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -25,4 +27,4 @@ left join
|
|||
on date_trunc('month', gj.date)::date = d.first_day_month
|
||||
and extract(day from gj.date) <= d.day
|
||||
where d.is_month_to_date = true and gj.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gj.id_deal,
|
||||
gj.dash_source,
|
||||
gj.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gj.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -25,4 +27,4 @@ left join
|
|||
on date_trunc('month', gj.date)::date = d.first_day_month
|
||||
and extract(day from gj.date) <= d.day
|
||||
where d.is_month_to_date = true and gj.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"has_id_check",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
|
|
@ -15,6 +16,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gp.id_deal,
|
||||
gp.dash_source,
|
||||
gp.has_id_check,
|
||||
gp.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
|
|
@ -30,4 +32,4 @@ left join
|
|||
on date_trunc('month', gp.date)::date = d.first_day_month
|
||||
and extract(day from gp.date) <= d.day
|
||||
where d.is_month_to_date = true and gp.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
group by 1, 2, 3, 4, 5, 6, 7
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"dash_source",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gj.id_deal,
|
||||
gj.dash_source,
|
||||
gj.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gj.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -25,4 +27,4 @@ left join
|
|||
on date_trunc('month', gj.date)::date = d.first_day_month
|
||||
and extract(day from gj.date) <= d.day
|
||||
where d.is_month_to_date = true and gj.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
{{
|
||||
config(
|
||||
materialized="view",
|
||||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"has_id_check",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
}}
|
||||
|
||||
select
|
||||
-- Unique Key --
|
||||
d.first_day_week as start_date,
|
||||
d.date as end_date,
|
||||
d.week,
|
||||
gp.id_deal,
|
||||
gp.has_id_check,
|
||||
gp.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gp.main_billing_country_iso_3_per_deal,
|
||||
-- Metrics --
|
||||
sum(gp.deposit_fees_in_gbp) as deposit_fees_in_gbp,
|
||||
sum(gp.waiver_payments_in_gbp) as waiver_payments_in_gbp,
|
||||
sum(gp.checkin_cover_fees_in_gbp) as checkin_cover_fees_in_gbp,
|
||||
sum(gp.total_guest_payments_in_gbp) as total_guest_payments_in_gbp
|
||||
from {{ ref("int_kpis__dimension_dates") }} d
|
||||
left join
|
||||
{{ ref("int_kpis__metric_daily_guest_payments") }} gp
|
||||
on date_trunc('week', gp.date)::date = d.first_day_week
|
||||
where d.is_end_of_week = true and gp.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5, 6, 7
|
||||
|
|
@ -1039,6 +1039,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -1046,6 +1047,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -1069,6 +1071,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -1109,6 +1121,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -1116,6 +1129,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -1139,6 +1153,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -1210,6 +1234,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -1264,6 +1289,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -1355,6 +1381,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -1362,6 +1389,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -1385,6 +1413,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -1425,6 +1463,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -1432,6 +1471,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -1455,6 +1495,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -1526,6 +1576,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -1580,6 +1631,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -1671,6 +1723,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -1678,6 +1731,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -1701,6 +1755,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -1741,6 +1805,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -1748,6 +1813,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -1771,6 +1837,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -1842,6 +1918,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -1896,6 +1973,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -1987,6 +2065,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -1994,6 +2073,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -2017,6 +2097,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -2057,6 +2147,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -2064,6 +2155,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -2087,6 +2179,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -2158,6 +2260,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -2212,6 +2315,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -2335,6 +2439,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- has_id_check,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
|
|
@ -2343,6 +2448,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- has_id_check
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
|
|
@ -2367,6 +2473,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: has_id_check
|
||||
data_type: string
|
||||
description: Does the verification in the guest journey
|
||||
|
|
@ -2436,6 +2552,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- dash_source,
|
||||
- has_id_check,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
|
|
@ -2444,6 +2561,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- dash_source
|
||||
- has_id_check
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
|
|
@ -2468,6 +2586,16 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dash_source
|
||||
data_type: string
|
||||
description: Dashboard source, either old or new.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "New Dash"
|
||||
- "Old Dash"
|
||||
|
||||
- name: has_id_check
|
||||
data_type: string
|
||||
description: Does the verification in the guest journey
|
||||
|
|
@ -2526,113 +2654,6 @@ models:
|
|||
Sum of accumulated total payments paid by guests, without taxes,
|
||||
in GBP in a given month up to the given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__metric_weekly_guest_payments
|
||||
description: |
|
||||
This model computes the Weekly Guest Payments at the
|
||||
deepest granularity.
|
||||
Be aware that any dimension that can change over the monthly period,
|
||||
such as daily segmentations, are included in the primary key of the
|
||||
model.
|
||||
|
||||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- has_id_check,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- has_id_check
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
- name: start_date
|
||||
data_type: date
|
||||
description: |
|
||||
The start date of the time range considered for the metrics in this record.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: week
|
||||
data_type: int
|
||||
description: ISO week number of the given date.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: has_id_check
|
||||
data_type: string
|
||||
description: Does the verification in the guest journey
|
||||
includes Government Id Check for the bookings.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- W/O Id Check
|
||||
- With Id Check
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
Segment value based on the number of listings booked in 12 months
|
||||
for a given deal and date.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "0"
|
||||
- "01-05"
|
||||
- "06-20"
|
||||
- "21-60"
|
||||
- "61+"
|
||||
- "UNSET"
|
||||
|
||||
- name: main_billing_country_iso_3_per_deal
|
||||
data_type: string
|
||||
description: |
|
||||
Main billing country of the host aggregated at Deal level.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: deposit_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of accumulated deposit fees paid by guests, without taxes,
|
||||
in GBP in a given week up to the given date and per specified dimension.
|
||||
|
||||
- name: waiver_payments_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of accumulated waiver payments paid by guests, without taxes,
|
||||
in GBP in a given week up to the given date and per specified dimension.
|
||||
|
||||
- name: checkin_cover_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of accumulated checkin cover fees by guests, without taxes,
|
||||
in GBP in a given week up to the given date and per specified dimension.
|
||||
|
||||
- name: total_guest_payments_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of accumulated total payments paid by guests, without taxes,
|
||||
in GBP in a given week up to the given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__agg_monthly_guest_payments
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
|
|
@ -2678,6 +2699,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
- by_has_id_check
|
||||
|
||||
|
|
@ -2756,6 +2778,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_dash_source
|
||||
- by_deal
|
||||
- by_has_id_check
|
||||
|
||||
|
|
@ -2789,84 +2812,6 @@ models:
|
|||
The month-to-date total payments paid by guests, without taxes, in GBP
|
||||
for a given range date, dimension and value.
|
||||
|
||||
- name: int_kpis__agg_weekly_guest_payments
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Weekly Guest Payments.
|
||||
|
||||
The primary key of this model is end_date, dimension
|
||||
and dimension_value.
|
||||
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- dimension
|
||||
- dimension_value
|
||||
|
||||
columns:
|
||||
- name: start_date
|
||||
data_type: date
|
||||
description: |
|
||||
The start date of the time range considered for the metrics in this record.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
data_tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_names:
|
||||
- deposit_fees_in_gbp
|
||||
- waiver_payments_in_gbp
|
||||
- checkin_cover_fees_in_gbp
|
||||
- total_guest_payments_in_gbp
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_deal
|
||||
- by_has_id_check
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: deposit_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
The weekly deposit fees paid by guests, without taxes, in GBP
|
||||
for a given range date, dimension and value.
|
||||
|
||||
- name: waiver_payments_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
The weekly waiver payments paid by guests, without taxes, in GBP
|
||||
for a given range date, dimension and value.
|
||||
|
||||
- name: checkin_cover_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
The weekly checkin cover fees paid by guests, without taxes, in GBP
|
||||
for a given range date, dimension and value.
|
||||
|
||||
- name: total_guest_payments_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
The weekly total payments paid by guests, without taxes, in GBP
|
||||
for a given range date, dimension and value.
|
||||
|
||||
- name: int_kpis__metric_daily_check_out_bookings
|
||||
description: |
|
||||
This model computes the Daily Check-out Bookings at the deepest granularity.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue