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
|
|
@ -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