Merged PR 3377: Adds GJ Created, Started and Completed in new KPIs flow
# Description Adds GJ Created, Started and Completed. Each model has: * A Daily model * A Monthly/MTD without dimension aggregate * A Monthly/MTD with dimension aggregate * A comparison vs. the current flow of KPIs in the form of a test It's quite similar as for Created Bookings. The main difference is that 1) reads from Verification Requests table and 2) I don't compute a New Dash dimension. This helps actually validating the logic of the dimension configuration macro, which works good. I confirm that the 3 tests of comparison vs. current data work well in my local - i.e. identical content for Global, Billing Country for these 3 metrics since 2022. This does not include: * Guest Journeys with Payment. I'll do this in a separated PR * Guest Payments/Revenue. I'll do this in a separated PR # 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. - [NA] I have checked for DRY opportunities with other models and docs. **Briefly discussed with Pablo, we'll leave it like this for the time being** - [X] I've picked the right materialization for the affected models. **Runs quite fast** # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #23453
This commit is contained in:
parent
86719b6a10
commit
8ddb695947
19 changed files with 1446 additions and 3 deletions
|
|
@ -360,8 +360,8 @@ models:
|
|||
- name: created_bookings
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of accummulated bookings created in a given month up to the
|
||||
given date and per specified dimension.
|
||||
Count of accummulated bookings created in a given month
|
||||
and per specified dimension.
|
||||
|
||||
- name: int_kpis__metric_mtd_created_bookings
|
||||
description: |
|
||||
|
|
@ -497,7 +497,7 @@ models:
|
|||
|
||||
- name: created_bookings
|
||||
data_type: bigint
|
||||
description: The month-to-date created bookings for a given date, dimension and value.
|
||||
description: The monthly created bookings for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_created_bookings
|
||||
description: |
|
||||
|
|
@ -552,3 +552,909 @@ models:
|
|||
- name: created_bookings
|
||||
data_type: bigint
|
||||
description: The month-to-date created bookings for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__metric_daily_created_guest_journeys
|
||||
description: |
|
||||
This model computes the Daily Created Guest Journeys at the deepest granularity.
|
||||
|
||||
The unique key corresponds to the deepest granularity of the model,
|
||||
in this case:
|
||||
- date,
|
||||
- id_deal.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
- id_deal
|
||||
|
||||
columns:
|
||||
- name: date
|
||||
data_type: date
|
||||
description: Date of when Guest Journeys have been created.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- 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.
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_guest_journeys
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of daily guest journeys created in a given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__metric_monthly_created_guest_journeys
|
||||
description: |
|
||||
This model computes the Monthly Created Guest Journeys 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,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- 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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- 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.
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_guest_journeys
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of accummulated guest journeys created in a given month
|
||||
and per specified dimension.
|
||||
|
||||
- name: int_kpis__metric_mtd_created_guest_journeys
|
||||
description: |
|
||||
This model computes the Month-To-Date Created Guest Journeys 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,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- 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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- 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.
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_guest_journeys
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of accummulated guest journeys created in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_created_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Created Guest Journeys.
|
||||
|
||||
The primary key of this model is end_date, dimension
|
||||
and dimension_value.
|
||||
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_name: created_guest_journeys
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_guest_journeys
|
||||
data_type: bigint
|
||||
description: The monthtly created guest journeys for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_created_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Created Guest Journeys.
|
||||
|
||||
The primary key of this model is end_date, dimension
|
||||
and dimension_value.
|
||||
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_name: created_guest_journeys
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_guest_journeys
|
||||
data_type: bigint
|
||||
description: The month-to-date created guest journeys for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__metric_daily_started_guest_journeys
|
||||
description: |
|
||||
This model computes the Daily Started Guest Journeys at the deepest granularity.
|
||||
|
||||
The unique key corresponds to the deepest granularity of the model,
|
||||
in this case:
|
||||
- date,
|
||||
- id_deal.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
- id_deal
|
||||
|
||||
columns:
|
||||
- name: date
|
||||
data_type: date
|
||||
description: Date of when Guest Journeys have been started.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- 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.
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: started_guest_journeys
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of daily guest journeys started in a given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__metric_monthly_started_guest_journeys
|
||||
description: |
|
||||
This model computes the Monthly Started Guest Journeys 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,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- 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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- 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.
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: started_guest_journeys
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of accummulated guest journeys started in a given month
|
||||
and per specified dimension.
|
||||
|
||||
- name: int_kpis__metric_mtd_started_guest_journeys
|
||||
description: |
|
||||
This model computes the Month-To-Date Started Guest Journeys 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,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- 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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- 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.
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: started_guest_journeys
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of accummulated guest journeys started in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_started_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Started Guest Journeys.
|
||||
|
||||
The primary key of this model is end_date, dimension
|
||||
and dimension_value.
|
||||
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_name: started_guest_journeys
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: started_guest_journeys
|
||||
data_type: bigint
|
||||
description: The monthly started guest journeys for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_started_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Started Guest Journeys.
|
||||
|
||||
The primary key of this model is end_date, dimension
|
||||
and dimension_value.
|
||||
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_name: started_guest_journeys
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: started_guest_journeys
|
||||
data_type: bigint
|
||||
description: The month-to-date started guest journeys for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__metric_daily_completed_guest_journeys
|
||||
description: |
|
||||
This model computes the Daily Completed Guest Journeys at the deepest granularity.
|
||||
|
||||
The unique key corresponds to the deepest granularity of the model,
|
||||
in this case:
|
||||
- date,
|
||||
- id_deal.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
- id_deal
|
||||
|
||||
columns:
|
||||
- name: date
|
||||
data_type: date
|
||||
description: Date of when Guest Journeys have been completed.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- 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.
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: completed_guest_journeys
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of daily guest journeys completed in a given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__metric_monthly_completed_guest_journeys
|
||||
description: |
|
||||
This model computes the Monthly Completed Guest Journeys 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,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- 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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- 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.
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: completed_guest_journeys
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of accummulated guest journeys completed in a given month
|
||||
and per specified dimension.
|
||||
|
||||
- name: int_kpis__metric_mtd_completed_guest_journeys
|
||||
description: |
|
||||
This model computes the Month-To-Date Completed Guest Journeys 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,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- id_deal
|
||||
- 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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- 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.
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: completed_guest_journeys
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of accummulated guest journeys completed in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_completed_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Completed Guest Journeys.
|
||||
|
||||
The primary key of this model is end_date, dimension
|
||||
and dimension_value.
|
||||
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_name: completed_guest_journeys
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: completed_guest_journeys
|
||||
data_type: bigint
|
||||
description: The monthly completed guest journeys for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_completed_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Completed Guest Journeys.
|
||||
|
||||
The primary key of this model is end_date, dimension
|
||||
and dimension_value.
|
||||
|
||||
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.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_name: completed_guest_journeys
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: completed_guest_journeys
|
||||
data_type: bigint
|
||||
description: The month-to-date completed guest journeys for a given date, dimension and value.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue