2024-11-12 14:41:01 +01:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
|
|
models:
|
|
|
|
|
- name: kpis__product_guest_daily_metrics
|
|
|
|
|
description: |
|
|
|
|
|
This model computes the Daily Guest Metrics at the deepest granularity.
|
|
|
|
|
Here all metrics are attributed to the Check-in Date of the associated
|
|
|
|
|
booking, except for payments which are attributed to payment date.
|
|
|
|
|
|
|
|
|
|
The unique key corresponds to the deepest granularity of the model,
|
|
|
|
|
in this case:
|
|
|
|
|
- date_day,
|
|
|
|
|
- py_date_day,
|
|
|
|
|
- id_deal,
|
2024-11-25 11:53:14 +01:00
|
|
|
- has_id_check,
|
|
|
|
|
- main_billing_country_iso_3_per_deal.
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
tests:
|
|
|
|
|
- dbt_utils.unique_combination_of_columns:
|
|
|
|
|
combination_of_columns:
|
|
|
|
|
- date_day
|
|
|
|
|
- py_date_day
|
|
|
|
|
- has_payment
|
|
|
|
|
- has_id_check
|
2024-11-25 11:53:14 +01:00
|
|
|
- main_billing_country_iso_3_per_deal
|
2024-11-12 14:41:01 +01:00
|
|
|
columns:
|
|
|
|
|
- name: date_day
|
|
|
|
|
data_type: date
|
|
|
|
|
description: "Date of when Guest Journeys have been completed."
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
2024-11-18 11:23:25 +01:00
|
|
|
- name: date_week
|
|
|
|
|
data_type: string
|
|
|
|
|
description: "Week number of when Guest Journeys have been completed."
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
2024-11-12 14:41:01 +01:00
|
|
|
- name: py_date_day
|
|
|
|
|
data_type: date
|
|
|
|
|
description: |
|
|
|
|
|
Date on the previous year of when Guest Journeys have been completed.
|
|
|
|
|
Note that this date can be NULL for leap days (29th February)
|
|
|
|
|
|
|
|
|
|
- name: has_payment
|
|
|
|
|
data_type: string
|
|
|
|
|
description: Has there been any guest payments on the guest journey.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- W/O Payment
|
|
|
|
|
- With Payment
|
|
|
|
|
|
|
|
|
|
- name: has_id_check
|
|
|
|
|
data_type: string
|
|
|
|
|
description: Does the verification in the guest journey
|
|
|
|
|
includes Government Id Check for the bookings.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- W/O Id Check
|
|
|
|
|
- With Id Check
|
|
|
|
|
|
2024-11-25 11:53:14 +01:00
|
|
|
- name: main_billing_country_iso_3_per_deal
|
|
|
|
|
data_type: string
|
|
|
|
|
description: |
|
|
|
|
|
Main billing country of the host.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
2024-11-12 14:41:01 +01:00
|
|
|
- name: created_guest_journeys_not_cancelled
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys created, excluding cancelled bookings,
|
|
|
|
|
in a given date and per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: created_guest_journeys_not_cancelled
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: started_guest_journeys_not_cancelled
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys started, excluding cancelled bookings,
|
|
|
|
|
in a given date and per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: started_guest_journeys_not_cancelled
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: completed_guest_journeys_not_cancelled
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys completed, excluding cancelled bookings,
|
|
|
|
|
in a given date and per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: completed_guest_journeys_not_cancelled
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: created_guest_journeys
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys created in a given date and
|
|
|
|
|
per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: created_guest_journeys
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: started_guest_journeys
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys started in a given date and
|
|
|
|
|
per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: started_guest_journeys
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: completed_guest_journeys
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys completed in a given date and
|
|
|
|
|
per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: completed_guest_journeys
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
2024-11-26 10:16:08 +01:00
|
|
|
- name: total_csat_score_count
|
2024-11-12 14:41:01 +01:00
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys with CSAT (customer satisfaction score)
|
|
|
|
|
in a given date and per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: total_csat_score_count
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: average_csat_score
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Average daily CSAT score in a given date and per specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: deposit_fees_in_gbp
|
|
|
|
|
data_type: decimal
|
|
|
|
|
description: |
|
|
|
|
|
Sum of deposit fees paid by guests, without taxes, in GBP
|
|
|
|
|
in a given date and per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: deposit_fees_in_gbp
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: waiver_payments_in_gbp
|
|
|
|
|
data_type: decimal
|
|
|
|
|
description: |
|
|
|
|
|
Sum of waiver payments paid by guests, without taxes, in GBP
|
|
|
|
|
in a given date and per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: waiver_payments_in_gbp
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: checkin_cover_fees_in_gbp
|
|
|
|
|
data_type: decimal
|
|
|
|
|
description: |
|
|
|
|
|
Sum of checkin cover fees paid by guests, without taxes, in GBP
|
|
|
|
|
in a given date and per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: checkin_cover_fees_in_gbp
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: total_guest_payments_in_gbp
|
|
|
|
|
data_type: decimal
|
|
|
|
|
description: |
|
|
|
|
|
Sum of total payments paid by guests, without taxes, in GBP
|
|
|
|
|
in a given date and per specified dimension.
|
2024-11-26 09:27:13 +01:00
|
|
|
tests:
|
2024-11-26 10:33:03 +01:00
|
|
|
- kpis_daily_outlier_detector:
|
|
|
|
|
column_name: total_guest_payments_in_gbp
|
|
|
|
|
date_column: date_day
|
2024-11-12 14:41:01 +01:00
|
|
|
|
|
|
|
|
- name: py_created_guest_journeys_not_cancelled
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys created (excluding canceled bookings)
|
|
|
|
|
on the same date in the previous year, segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_started_guest_journeys_not_cancelled
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys started (excluding canceled bookings)
|
|
|
|
|
on the same date in the previous year, segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_completed_guest_journeys_not_cancelled
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys completed (excluding canceled bookings)
|
|
|
|
|
on the same date in the previous year, segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_created_guest_journeys
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys created on the same date in the previous year,
|
|
|
|
|
segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_started_guest_journeys
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys started on the same date in the previous year,
|
|
|
|
|
segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_completed_guest_journeys
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys completed on the same date in the previous year,
|
|
|
|
|
segmented by the specified dimension.
|
|
|
|
|
|
2024-11-26 10:16:08 +01:00
|
|
|
- name: py_total_csat_score_count
|
2024-11-12 14:41:01 +01:00
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Count of daily guest journeys with CSAT (customer satisfaction score)
|
|
|
|
|
on the same date in the previous year, segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_average_csat_score
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
|
|
|
|
Average daily CSAT score on the same date in the previous year,
|
|
|
|
|
segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_deposit_fees_in_gbp
|
|
|
|
|
data_type: decimal
|
|
|
|
|
description: |
|
|
|
|
|
Sum of deposit fees paid by guests, excluding taxes, in GBP
|
|
|
|
|
on the same date in the previous year, segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_waiver_payments_in_gbp
|
|
|
|
|
data_type: decimal
|
|
|
|
|
description: |
|
|
|
|
|
Sum of waiver payments paid by guests, excluding taxes, in GBP
|
|
|
|
|
on the same date in the previous year, segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_checkin_cover_fees_in_gbp
|
|
|
|
|
data_type: decimal
|
|
|
|
|
description: |
|
|
|
|
|
Sum of check-in cover fees paid by guests, excluding taxes, in GBP
|
|
|
|
|
on the same date in the previous year, segmented by the specified dimension.
|
|
|
|
|
|
|
|
|
|
- name: py_total_guest_payments_in_gbp
|
|
|
|
|
data_type: decimal
|
|
|
|
|
description: |
|
|
|
|
|
Sum of total payments paid by guests, excluding taxes, in GBP
|
|
|
|
|
on the same date in the previous year, segmented by the specified dimension.
|
2024-11-20 09:43:30 +00:00
|
|
|
|
|
|
|
|
- name: kpis__product_new_dash_agg_metrics
|
|
|
|
|
description: |
|
|
|
|
|
Reporting model for New Dash specific KPIs. It's an aggregated version
|
|
|
|
|
of time granularity, dimension, dimension value and list of metrics
|
|
|
|
|
with their value.
|
|
|
|
|
|
|
|
|
|
tests:
|
|
|
|
|
- dbt_utils.unique_combination_of_columns:
|
|
|
|
|
combination_of_columns:
|
|
|
|
|
- date
|
|
|
|
|
- time_granularity
|
|
|
|
|
- dimension
|
|
|
|
|
- dimension_value
|
|
|
|
|
|
|
|
|
|
columns:
|
|
|
|
|
- name: date
|
|
|
|
|
data_type: date
|
|
|
|
|
description: |
|
|
|
|
|
The end date of the time range specified in the time_granularity
|
|
|
|
|
for the dimension, dimension_value and metrics in this record.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
|
|
|
|
- name: time_granularity
|
|
|
|
|
data_type: string
|
|
|
|
|
description: The time dimension.
|
|
|
|
|
tests:
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
2024-11-20 11:01:22 +00:00
|
|
|
- Daily
|
2024-11-21 11:30:36 +00:00
|
|
|
- Weekly
|
2024-11-20 11:01:22 +00:00
|
|
|
- Monthly
|
2024-11-20 09:43:30 +00:00
|
|
|
|
|
|
|
|
- name: dimension
|
|
|
|
|
data_type: string
|
|
|
|
|
description: The dimension or granularity of the metrics.
|
|
|
|
|
tests:
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
2024-11-20 11:01:22 +00:00
|
|
|
- "Global"
|
|
|
|
|
- "By Number Of Listings"
|
|
|
|
|
- "By Billing Country"
|
|
|
|
|
- "By Deal"
|
|
|
|
|
- "By New Dash Version"
|
|
|
|
|
- "By Has Upgraded Service"
|
|
|
|
|
- "By Service"
|
2024-11-26 14:19:41 +00:00
|
|
|
- "By Service Business Type"
|
2024-11-20 09:43:30 +00:00
|
|
|
|
|
|
|
|
- name: dimension_value
|
|
|
|
|
data_type: string
|
|
|
|
|
description: The value or segment available for the selected dimension.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
|
|
|
|
- name: created_services
|
|
|
|
|
data_type: bigint
|
2024-11-26 14:19:41 +00:00
|
|
|
description: |
|
|
|
|
|
The created services for a given time granularity, date or dates range,
|
|
|
|
|
dimension and value.
|
2024-11-20 09:43:30 +00:00
|
|
|
|
|
|
|
|
- name: booking_with_created_services_count
|
|
|
|
|
data_type: bigint
|
|
|
|
|
description: |
|
2024-11-26 14:19:41 +00:00
|
|
|
The bookings with created services for a given time granularity, date or
|
|
|
|
|
dates range, dimension and value.
|
2024-11-20 09:43:30 +00:00
|
|
|
This is an approximation to booking count since different services can
|
|
|
|
|
apply to the same booking and these do not need to be created in the same
|
|
|
|
|
time period. Therefore, it's not an additive metric.
|
2024-11-26 14:19:41 +00:00
|
|
|
|
|
|
|
|
- name: total_chargeable_services
|
|
|
|
|
data_type: integer
|
|
|
|
|
description: |
|
|
|
|
|
The total chargeable services for a given time granularity, date or
|
|
|
|
|
dates range, dimension and value.
|
|
|
|
|
|
|
|
|
|
- name: total_chargeable_amount_in_gbp
|
|
|
|
|
data_type: decimal
|
|
|
|
|
description: |
|
|
|
|
|
The total daily chargeable amount for a given time granularity, date or
|
|
|
|
|
dates range, dimension and value, in GBP.
|
|
|
|
|
|
|
|
|
|
- name: unique_chargeable_bookings
|
|
|
|
|
data_type: integer
|
|
|
|
|
description: |
|
|
|
|
|
The unique daily chargeable bookings for a given time granularity, date or
|
|
|
|
|
dates range, dimension and value.
|
|
|
|
|
This metric is not additive, and its value can vary depending on the time
|
|
|
|
|
period considered.
|
|
|
|
|
|
|
|
|
|
- name: unique_chargeable_listings
|
|
|
|
|
data_type: integer
|
|
|
|
|
description: |
|
|
|
|
|
The unique daily chargeable accommodations, or listings, for a given time
|
|
|
|
|
granularity, date or dates range, dimension and value.
|
|
|
|
|
This metric is not additive, and its value can vary depending on the time
|
|
|
|
|
period considered.
|
2024-11-26 16:43:56 +01:00
|
|
|
|
|
|
|
|
- name: kpis__product_guest_agg_metrics
|
|
|
|
|
description:
|
|
|
|
|
This model aggregates multiple metrics on a Year-to-date, Month-to-date or
|
|
|
|
|
Week-to-date basis. This model changes the display format of the model
|
|
|
|
|
int_kpis__product_guest_daily_metrics pivoting the metrics columns and
|
|
|
|
|
adding a timeframe dimension.
|
|
|
|
|
columns:
|
|
|
|
|
- name: metric
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Name of the business metric
|
|
|
|
|
|
|
|
|
|
- name: has_payment
|
|
|
|
|
data_type: string
|
|
|
|
|
description: Has there been any guest payments on the guest journey.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- W/O Payment
|
|
|
|
|
- With Payment
|
|
|
|
|
|
|
|
|
|
- name: has_id_check
|
|
|
|
|
data_type: string
|
|
|
|
|
description: Does the verification in the guest journey
|
|
|
|
|
includes Government Id Check for the bookings.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- W/O Id Check
|
|
|
|
|
- With Id Check
|
|
|
|
|
|
|
|
|
|
- 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: timeframe
|
|
|
|
|
data_type: text
|
|
|
|
|
description: |
|
|
|
|
|
Timeframe considered for the aggregation, it could be Year-to-date,
|
|
|
|
|
Month-to-date or Week-to-date
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- YTD
|
|
|
|
|
- MTD
|
|
|
|
|
- WTD
|
|
|
|
|
|
|
|
|
|
- name: current_value
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
Numeric value (integer or decimal) that corresponds to the timeframe
|
|
|
|
|
computation of the metric at the current date.
|
|
|
|
|
For example if the current date is 27/11/2024 and the timeframe is MTD,
|
|
|
|
|
then this value would correspond to the computation of the metric for
|
|
|
|
|
the dates between 01/11/2024 and 27/11/2024.
|
|
|
|
|
|
|
|
|
|
- name: py_value
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
Numeric value (integer or decimal) that corresponds to the timeframe
|
|
|
|
|
computation of the metric at the current date but on the previous year.
|
|
|
|
|
For example if the current date is 27/11/2024 and the timeframe is MTD,
|
|
|
|
|
then this value would correspond to the computation of the metric for
|
|
|
|
|
the dates between 01/11/2023 and 27/11/2023.
|
|
|
|
|
|
|
|
|
|
- name: pp_value
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
Numeric value (integer or decimal) that corresponds to the timeframe
|
|
|
|
|
computation of the metric at the current date but on the previous period.
|
|
|
|
|
For example if the current date is 27/11/2024 and the timeframe is MTD,
|
|
|
|
|
then this value would correspond to the computation of the metric for
|
|
|
|
|
the dates between 01/10/2024 and 27/10/2024.
|