Readded schema

This commit is contained in:
Joaquin 2025-04-02 12:07:39 +02:00
parent ab179577b1
commit e8da311463

View file

@ -8343,3 +8343,284 @@ models:
description: |
The month-to-date Revenue Retained Post-Resolutions in GBP
for a given date, dimension and value.
- name: int_kpis__metric_daily_new_dash_created_bookings
description: |
This model computes the Daily Created Bookings with Services at the deepest granularity.
It only retrieves services that come from users that are in New Dash, as well
as it only considers services created after the user has moved to New Dash.
The unique key corresponds to the deepest granularity of the model,
in this case:
- date,
- id_booking,
- id_user_product_bundle,
- service_name,
- service_business_type
data_tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date
- id_booking
- id_user_product_bundle
- service_name
- service_business_type
columns:
- name: date
data_type: date
description: Date of when the Booking was created.
data_tests:
- not_null
- name: id_booking
data_type: bigint
description: Unique identifier of the Booking.
data_tests:
- not_null
- name: id_user_product_bundle
data_type: bigint
description: Unique identifier of the User Product Bundle.
data_tests:
- not_null
- name: service_name
data_type: string
description: Name of the created service.
data_tests:
- not_null
- name: id_deal
data_type: string
description: Unique identifier of an account.
data_tests:
- not_null
- name: is_upgraded_service
data_type: string
description: |
Whether the service is an upgraded version of the
default. In other words, if it's not Basic Screening.
data_tests:
- not_null
- accepted_values:
values:
- "YES"
- "NO"
- name: service_business_type
data_type: string
description: |
Identifies the service type (Screening, Deposit Management, Protection
or Guest Agreement) according to New Pricing documentation.
Cannot be null.
data_tests:
- not_null
- accepted_values:
values:
- "SCREENING"
- "PROTECTION"
- "DEPOSIT_MANAGEMENT"
- "GUEST_AGREEMENT"
- "UNKNOWN"
- "UNSET"
- name: new_dash_version
data_type: string
description: |
The version of the New Dash. It corresponds to the
release or migration phase from user point of view.
data_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.
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: int_kpis__agg_weekly_new_dash_created_bookings
description: |
This model computes the dimension aggregation for Weekly Created Bookings with Services.
It only retrieves services that come from users that are in New Dash, as well
as it only considers services created after the user has moved to New Dash.
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:
- created_bookings
where: "dimension in ('by_number_of_listings', 'by_billing_country', 'by_new_dash_version', 'by_deal')"
- accepted_values:
values:
- global
- by_number_of_listings
- by_billing_country
- by_deal
- by_new_dash_version
- by_has_upgraded_service
- by_service
- by_service_business_type
- name: dimension_value
data_type: string
description: The value or segment available for the selected dimension.
data_tests:
- not_null
- name: created_bookings
data_type: bigint
description: The weekly created bookings for a given date range, dimension and value.
- name: int_kpis__agg_monthly_new_dash_created_bookings
description: |
This model computes the dimension aggregation for Monthly Created Bookings with Services.
It only retrieves services that come from users that are in New Dash, as well
as it only considers services created after the user has moved to New Dash.
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:
- created_bookings
where: "dimension in ('by_number_of_listings', 'by_billing_country', 'by_new_dash_version', 'by_deal')"
- accepted_values:
values:
- global
- by_number_of_listings
- by_billing_country
- by_deal
- by_new_dash_version
- by_has_upgraded_service
- by_service
- by_service_business_type
- name: dimension_value
data_type: string
description: The value or segment available for the selected dimension.
data_tests:
- not_null
- name: created_bookings
data_type: bigint
description: The monthly created bookings for a given date range, dimension and value.
- name: int_kpis__agg_daily_new_dash_created_bookings
description: |
This model computes the dimension aggregation for Daily Created Bookings with Services.
It only retrieves services that come from users that are in New Dash, as well
as it only considers services created after the user has moved to New Dash.
The primary key of this model is date, dimension and dimension_value.
data_tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date
- dimension
- dimension_value
columns:
- name: date
data_type: date
description: |
The daily date acting as time range 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:
- created_bookings
where: "dimension in ('by_number_of_listings', 'by_billing_country', 'by_new_dash_version', 'by_deal')"
- accepted_values:
values:
- global
- by_number_of_listings
- by_billing_country
- by_deal
- by_new_dash_version
- by_has_upgraded_service
- by_service
- by_service_business_type
- name: dimension_value
data_type: string
description: The value or segment available for the selected dimension.
data_tests:
- not_null
- name: created_bookings
data_type: bigint
description: The daily created bookings for a given date, dimension and value.