Merged PR 4357: Propagates in Host Resolutions and Invoiced Revenue the new business scope
# Description Changes: * Business scope is now propagated in Host Resolutions and Invoiced Revenue Monthly/MTD Metric and Aggregated 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
78707ef649
commit
edddb0ac37
6 changed files with 78 additions and 4 deletions
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"business_scope",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
hr.id_deal,
|
||||
hr.business_scope,
|
||||
hr.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
hr.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -27,4 +29,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_host_resolutions") }} hr
|
||||
on date_trunc('month', hr.date)::date = d.first_day_month
|
||||
where d.is_end_of_month = true and hr.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",
|
||||
"business_scope",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
ir.id_deal,
|
||||
ir.business_scope,
|
||||
ir.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
ir.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -56,4 +58,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_invoiced_revenue") }} ir
|
||||
on date_trunc('month', ir.date)::date = d.first_day_month
|
||||
where d.is_end_of_month = true and ir.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",
|
||||
"business_scope",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
hr.id_deal,
|
||||
hr.business_scope,
|
||||
hr.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
hr.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -28,4 +30,4 @@ left join
|
|||
on date_trunc('month', hr.date)::date = d.first_day_month
|
||||
and extract(day from hr.date) <= d.day
|
||||
where d.is_month_to_date = true and hr.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",
|
||||
"business_scope",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
ir.id_deal,
|
||||
ir.business_scope,
|
||||
ir.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
ir.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -57,4 +59,4 @@ left join
|
|||
on date_trunc('month', ir.date)::date = d.first_day_month
|
||||
and extract(day from ir.date) <= d.day
|
||||
where d.is_month_to_date = true and ir.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
|
|
@ -3814,6 +3814,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- business_scope,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -3821,6 +3822,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- business_scope
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -3844,6 +3846,19 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: business_scope
|
||||
data_type: string
|
||||
description: |
|
||||
Business scope identifying the metric source.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "Old Dash"
|
||||
- "New Dash"
|
||||
- "API"
|
||||
- "UNSET"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -3890,6 +3905,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- business_scope,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -3897,6 +3913,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- business_scope
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -3920,6 +3937,19 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: business_scope
|
||||
data_type: string
|
||||
description: |
|
||||
Business scope identifying the metric source.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "Old Dash"
|
||||
- "New Dash"
|
||||
- "API"
|
||||
- "UNSET"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -3998,6 +4028,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_business_scope
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -4060,6 +4091,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_business_scope
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -4290,6 +4322,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- business_scope,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -4297,6 +4330,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- business_scope
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -4320,6 +4354,19 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: business_scope
|
||||
data_type: string
|
||||
description: |
|
||||
Business scope identifying the metric source.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "Old Dash"
|
||||
- "New Dash"
|
||||
- "API"
|
||||
- "UNSET"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -4470,6 +4517,7 @@ models:
|
|||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- id_deal,
|
||||
- business_scope,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -4477,6 +4525,7 @@ models:
|
|||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- business_scope
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -4500,6 +4549,19 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: business_scope
|
||||
data_type: string
|
||||
description: |
|
||||
Business scope identifying the metric source.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "Old Dash"
|
||||
- "New Dash"
|
||||
- "API"
|
||||
- "UNSET"
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -4700,6 +4762,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_business_scope
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -4877,6 +4940,7 @@ models:
|
|||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_business_scope
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue