Merged PR 4395: Propagates business scope into Deal/Listing metrics
# Description Changes: * Propagates business scope, based on deal, for Deal and Listing metrics. This already handles the daily metric and the daily aggregation. * Modifies lifecycle_daily_deal to depend on dimension_deals and compute API segmentation. * Creates new metric: Live Deals, that includes New, Active and Reactivated. This will be needed for YTD/MTD overview. # 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
5382a9b32b
commit
d8a0bb07d3
6 changed files with 159 additions and 46 deletions
|
|
@ -5075,6 +5075,7 @@ models:
|
|||
in this case:
|
||||
- date,
|
||||
- main_billing_country_iso_3_per_deal,
|
||||
- business_scope,
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
data_tests:
|
||||
|
|
@ -5082,6 +5083,7 @@ models:
|
|||
combination_of_columns:
|
||||
- date
|
||||
- main_billing_country_iso_3_per_deal
|
||||
- business_scope
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
|
|
@ -5091,6 +5093,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: |
|
||||
|
|
@ -5159,6 +5174,12 @@ models:
|
|||
description: |
|
||||
Count of deals booked within the past 12 months in a given date and per specified dimension.
|
||||
|
||||
- name: live_deals
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of live deals in a given date and per specified dimension.
|
||||
This accounts for New Deals, Active Deals and Reactivated Deals.
|
||||
|
||||
- name: int_kpis__agg_daily_deals
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
|
|
@ -5205,12 +5226,14 @@ models:
|
|||
- deals_booked_in_month
|
||||
- deals_booked_in_6_months
|
||||
- deals_booked_in_12_months
|
||||
- live_deals
|
||||
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_business_scope
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
|
|
@ -5287,6 +5310,12 @@ models:
|
|||
description: |
|
||||
Count of deals booked within the past 12 months for a given date, dimension and value.
|
||||
|
||||
- name: live_deals
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of live deals in a given date and per specified dimension.
|
||||
This accounts for New Deals, Never Booked Deals, Active Deals and Reactivated Deals.
|
||||
|
||||
- name: int_kpis__metric_daily_listings
|
||||
description: |
|
||||
This model computes the Daily Listing metrics at the deepest granularity.
|
||||
|
|
@ -5299,6 +5328,7 @@ models:
|
|||
The unique key corresponds to the deepest granularity of the model,
|
||||
in this case:
|
||||
- date,
|
||||
- business_scope
|
||||
- id_deal
|
||||
|
||||
data_tests:
|
||||
|
|
@ -5306,6 +5336,7 @@ models:
|
|||
combination_of_columns:
|
||||
- date
|
||||
- id_deal
|
||||
- business_scope
|
||||
|
||||
columns:
|
||||
- name: date
|
||||
|
|
@ -5320,6 +5351,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: |
|
||||
|
|
@ -5443,6 +5487,7 @@ models:
|
|||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_deal
|
||||
- by_business_scope
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue