From 77cfd36571808bf1d0e3f04db6c6d5c099d89bca Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Thu, 21 Nov 2024 09:14:37 +0100 Subject: [PATCH] Removed guest metrics aggregated models --- ...hly_check_in_attributed_guest_journeys.sql | 37 - ...mtd_check_in_attributed_guest_journeys.sql | 37 - ...kly_check_in_attributed_guest_journeys.sql | 41 - ...hly_check_in_attributed_guest_journeys.sql | 34 - ...mtd_check_in_attributed_guest_journeys.sql | 35 - ...kly_check_in_attributed_guest_journeys.sql | 42 - models/intermediate/kpis/schema.yml | 828 ------------------ models/reporting/exposures.yml | 2 +- 8 files changed, 1 insertion(+), 1055 deletions(-) delete mode 100644 models/intermediate/kpis/int_kpis__agg_monthly_check_in_attributed_guest_journeys.sql delete mode 100644 models/intermediate/kpis/int_kpis__agg_mtd_check_in_attributed_guest_journeys.sql delete mode 100644 models/intermediate/kpis/int_kpis__agg_weekly_check_in_attributed_guest_journeys.sql delete mode 100644 models/intermediate/kpis/int_kpis__metric_monthly_check_in_attributed_guest_journeys.sql delete mode 100644 models/intermediate/kpis/int_kpis__metric_mtd_check_in_attributed_guest_journeys.sql delete mode 100644 models/intermediate/kpis/int_kpis__metric_weekly_check_in_attributed_guest_journeys.sql diff --git a/models/intermediate/kpis/int_kpis__agg_monthly_check_in_attributed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__agg_monthly_check_in_attributed_guest_journeys.sql deleted file mode 100644 index 02d6fe6..0000000 --- a/models/intermediate/kpis/int_kpis__agg_monthly_check_in_attributed_guest_journeys.sql +++ /dev/null @@ -1,37 +0,0 @@ -{% set dimensions = get_kpi_dimensions_per_model("CHECK_IN_ATTRIBUTED_GUEST_JOURNEYS") %} - -{{ - config( - materialized="table", unique_key=["end_date", "dimension", "dimension_value"] - ) -}} - - -{% for dimension in dimensions %} - select - -- Unique Key -- - start_date, - end_date, - {{ dimension.dimension }} as dimension, - {{ dimension.dimension_value }} as dimension_value, - -- Metrics -- - sum( - created_guest_journeys_not_cancelled - ) as created_guest_journeys_not_cancelled, - sum( - started_guest_journeys_not_cancelled - ) as started_guest_journeys_not_cancelled, - sum( - completed_guest_journeys_not_cancelled - ) as completed_guest_journeys_not_cancelled, - sum(created_guest_journeys) as created_guest_journeys, - sum(started_guest_journeys) as started_guest_journeys, - sum(completed_guest_journeys) as completed_guest_journeys, - sum(count_csat_score) as count_csat_score, - sum(count_csat_score * average_csat_score) / nullif(sum(count_csat_score), 0) as average_csat_score - from {{ ref("int_kpis__metric_monthly_check_in_attributed_guest_journeys") }} - group by 1, 2, 3, 4 - {% if not loop.last %} - union all - {% endif %} -{% endfor %} diff --git a/models/intermediate/kpis/int_kpis__agg_mtd_check_in_attributed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__agg_mtd_check_in_attributed_guest_journeys.sql deleted file mode 100644 index 27a9b7e..0000000 --- a/models/intermediate/kpis/int_kpis__agg_mtd_check_in_attributed_guest_journeys.sql +++ /dev/null @@ -1,37 +0,0 @@ -{% set dimensions = get_kpi_dimensions_per_model("CHECK_IN_ATTRIBUTED_GUEST_JOURNEYS") %} - -{{ - config( - materialized="table", unique_key=["end_date", "dimension", "dimension_value"] - ) -}} - - -{% for dimension in dimensions %} - select - -- Unique Key -- - start_date, - end_date, - {{ dimension.dimension }} as dimension, - {{ dimension.dimension_value }} as dimension_value, - -- Metrics -- - sum( - created_guest_journeys_not_cancelled - ) as created_guest_journeys_not_cancelled, - sum( - started_guest_journeys_not_cancelled - ) as started_guest_journeys_not_cancelled, - sum( - completed_guest_journeys_not_cancelled - ) as completed_guest_journeys_not_cancelled, - sum(created_guest_journeys) as created_guest_journeys, - sum(started_guest_journeys) as started_guest_journeys, - sum(completed_guest_journeys) as completed_guest_journeys, - sum(count_csat_score) as count_csat_score, - sum(count_csat_score * average_csat_score) / nullif(sum(count_csat_score), 0) as average_csat_score - from {{ ref("int_kpis__metric_mtd_check_in_attributed_guest_journeys") }} - group by 1, 2, 3, 4 - {% if not loop.last %} - union all - {% endif %} -{% endfor %} \ No newline at end of file diff --git a/models/intermediate/kpis/int_kpis__agg_weekly_check_in_attributed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__agg_weekly_check_in_attributed_guest_journeys.sql deleted file mode 100644 index 5c92bbc..0000000 --- a/models/intermediate/kpis/int_kpis__agg_weekly_check_in_attributed_guest_journeys.sql +++ /dev/null @@ -1,41 +0,0 @@ -{% set dimensions = get_kpi_dimensions_per_model( - "CHECK_IN_ATTRIBUTED_GUEST_JOURNEYS" -) %} - -{{ - config( - materialized="table", unique_key=["end_date", "dimension", "dimension_value"] - ) -}} - - -{% for dimension in dimensions %} - select - -- Unique Key -- - start_date, - end_date, - week, - {{ dimension.dimension }} as dimension, - {{ dimension.dimension_value }} as dimension_value, - -- Metrics -- - sum( - created_guest_journeys_not_cancelled - ) as created_guest_journeys_not_cancelled, - sum( - started_guest_journeys_not_cancelled - ) as started_guest_journeys_not_cancelled, - sum( - completed_guest_journeys_not_cancelled - ) as completed_guest_journeys_not_cancelled, - sum(created_guest_journeys) as created_guest_journeys, - sum(started_guest_journeys) as started_guest_journeys, - sum(completed_guest_journeys) as completed_guest_journeys, - sum(count_csat_score) as count_csat_score, - sum(count_csat_score * average_csat_score) - / nullif(sum(count_csat_score), 0) as average_csat_score - from {{ ref("int_kpis__metric_weekly_check_in_attributed_guest_journeys") }} - group by 1, 2, 3, 4, 5 - {% if not loop.last %} - union all - {% endif %} -{% endfor %} diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_check_in_attributed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_monthly_check_in_attributed_guest_journeys.sql deleted file mode 100644 index 41c37db..0000000 --- a/models/intermediate/kpis/int_kpis__metric_monthly_check_in_attributed_guest_journeys.sql +++ /dev/null @@ -1,34 +0,0 @@ -{{ - config( - materialized="view", - unique_key=["end_date", "id_deal", "has_payment", "has_id_check", "active_accommodations_per_deal_segmentation"], - ) -}} - -select - -- Unique Key -- - d.first_day_month as start_date, - d.date as end_date, - b.id_deal, - b.has_payment, - b.has_id_check, - -- Dimensions -- - b.active_accommodations_per_deal_segmentation, - b.main_billing_country_iso_3_per_deal, - -- Metrics -- - sum(b.created_guest_journeys_not_cancelled) as created_guest_journeys_not_cancelled, - sum(b.started_guest_journeys_not_cancelled) as started_guest_journeys_not_cancelled, - sum( - b.completed_guest_journeys_not_cancelled - ) as completed_guest_journeys_not_cancelled, - sum(b.created_guest_journeys) as created_guest_journeys, - sum(b.started_guest_journeys) as started_guest_journeys, - sum(b.completed_guest_journeys) as completed_guest_journeys, - sum(b.count_csat_score) as count_csat_score, - sum(b.count_csat_score * b.average_csat_score) / nullif(sum(b.count_csat_score), 0) as average_csat_score -from {{ ref("int_kpis__dimension_dates") }} d -left join - {{ ref("int_kpis__metric_daily_check_in_attributed_guest_journeys") }} b - on date_trunc('month', b.date)::date = d.first_day_month -where d.is_end_of_month = true and b.id_deal is not null -group by 1, 2, 3, 4, 5, 6, 7 diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_check_in_attributed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_mtd_check_in_attributed_guest_journeys.sql deleted file mode 100644 index b93cab7..0000000 --- a/models/intermediate/kpis/int_kpis__metric_mtd_check_in_attributed_guest_journeys.sql +++ /dev/null @@ -1,35 +0,0 @@ -{{ - config( - materialized="view", - unique_key=["end_date", "id_deal", "has_payment", "has_id_check", "active_accommodations_per_deal_segmentation"], - ) -}} - -select - -- Unique Key -- - d.first_day_month as start_date, - d.date as end_date, - b.id_deal, - b.has_payment, - b.has_id_check, - -- Dimensions -- - b.active_accommodations_per_deal_segmentation, - b.main_billing_country_iso_3_per_deal, - -- Metrics -- - sum(b.created_guest_journeys_not_cancelled) as created_guest_journeys_not_cancelled, - sum(b.started_guest_journeys_not_cancelled) as started_guest_journeys_not_cancelled, - sum( - b.completed_guest_journeys_not_cancelled - ) as completed_guest_journeys_not_cancelled, - sum(b.created_guest_journeys) as created_guest_journeys, - sum(b.started_guest_journeys) as started_guest_journeys, - sum(b.completed_guest_journeys) as completed_guest_journeys, - sum(b.count_csat_score) as count_csat_score, - sum(b.count_csat_score * b.average_csat_score) / nullif(sum(b.count_csat_score), 0) as average_csat_score -from {{ ref("int_kpis__dimension_dates") }} d -left join - {{ ref("int_kpis__metric_daily_check_in_attributed_guest_journeys") }} b - on date_trunc('month', b.date)::date = d.first_day_month - and extract(day from b.date) <= d.day -where d.is_month_to_date = true and b.id_deal is not null -group by 1, 2, 3, 4, 5, 6, 7 \ No newline at end of file diff --git a/models/intermediate/kpis/int_kpis__metric_weekly_check_in_attributed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_weekly_check_in_attributed_guest_journeys.sql deleted file mode 100644 index 8bdbec8..0000000 --- a/models/intermediate/kpis/int_kpis__metric_weekly_check_in_attributed_guest_journeys.sql +++ /dev/null @@ -1,42 +0,0 @@ -{{ - config( - materialized="view", - unique_key=[ - "end_date", - "id_deal", - "has_payment", - "has_id_check", - "active_accommodations_per_deal_segmentation", - ], - ) -}} - -select - -- Unique Key -- - d.first_day_week as start_date, - d.date as end_date, - d.week, - b.id_deal, - b.has_payment, - b.has_id_check, - -- Dimensions -- - b.active_accommodations_per_deal_segmentation, - b.main_billing_country_iso_3_per_deal, - -- Metrics -- - sum(b.created_guest_journeys_not_cancelled) as created_guest_journeys_not_cancelled, - sum(b.started_guest_journeys_not_cancelled) as started_guest_journeys_not_cancelled, - sum( - b.completed_guest_journeys_not_cancelled - ) as completed_guest_journeys_not_cancelled, - sum(b.created_guest_journeys) as created_guest_journeys, - sum(b.started_guest_journeys) as started_guest_journeys, - sum(b.completed_guest_journeys) as completed_guest_journeys, - sum(b.count_csat_score) as count_csat_score, - sum(b.count_csat_score * b.average_csat_score) - / nullif(sum(b.count_csat_score), 0) as average_csat_score -from {{ ref("int_kpis__dimension_dates") }} d -left join - {{ ref("int_kpis__metric_daily_check_in_attributed_guest_journeys") }} b - on date_trunc('week', b.date)::date = d.first_day_week -where d.is_end_of_week = true and b.id_deal is not null -group by 1, 2, 3, 4, 5, 6, 7, 8 diff --git a/models/intermediate/kpis/schema.yml b/models/intermediate/kpis/schema.yml index a4dc14f..ca4fe59 100644 --- a/models/intermediate/kpis/schema.yml +++ b/models/intermediate/kpis/schema.yml @@ -3680,834 +3680,6 @@ models: description: | Average daily CSAT score in a given date and per specified dimension. - - name: int_kpis__metric_monthly_check_in_attributed_guest_journeys - description: | - This model computes the Monthly metrics associated with Guest Journeys - attributed to Check-In date at the deepest granularity. - - The unique key corresponds to: - - end_date, - - id_deal, - - has_payment, - - has_id_check, - - active_accommodations_per_deal_segmentation. - - tests: - - dbt_utils.unique_combination_of_columns: - combination_of_columns: - - end_date - - id_deal - - has_payment - - has_id_check - - 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: character varying - description: Unique identifier of an account. - tests: - - not_null - - - 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 - include Government Id Check for the bookings. - tests: - - not_null - - accepted_values: - values: - - W/O Id Check - - With Id Check - - - name: active_accommodations_per_deal_segmentation - data_type: text - 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: character varying - description: | - Main billing country of the host aggregated at Deal level. - tests: - - not_null - - - name: created_guest_journeys_not_cancelled - data_type: numeric - description: | - Monthly accumulated count of daily guest journeys created, excluding cancelled - bookings, in a given date and per specified dimension. - tests: - - not_null - - - name: started_guest_journeys_not_cancelled - data_type: numeric - description: | - Monthly accumulated count of daily guest journeys started, excluding cancelled - bookings, in a given date and per specified dimension. - tests: - - not_null - - - name: completed_guest_journeys_not_cancelled - data_type: numeric - description: | - Monthly accumulated count of daily guest journeys completed, excluding cancelled - bookings, in a given date and per specified dimension. - tests: - - not_null - - - name: created_guest_journeys - data_type: numeric - description: | - Monthly accumulated count of daily guest journeys created in a given date and - per specified dimension. - tests: - - not_null - - - name: started_guest_journeys - data_type: numeric - description: | - Monthly accumulated count of daily guest journeys started in a given date and - per specified dimension. - tests: - - not_null - - - name: completed_guest_journeys - data_type: numeric - description: | - Monthly accumulated count of daily guest journeys completed in a given date and - per specified dimension. - tests: - - not_null - - - name: count_csat_score - data_type: numeric - description: | - Monthly accumulated count of guest journeys with CSAT - (customer satisfaction score) in a given date, dimension, and value. - - - name: average_csat_score - data_type: numeric - description: | - Monthly accumulated average CSAT score in a given date, dimension, and value. - tests: - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0 - max_value: 5 - strictly: false - - - name: int_kpis__agg_monthly_check_in_attributed_guest_journeys - description: | - This model computes the dimension aggregation for Monthly metrics associated - to Guest Journeys attributed to Check-In date. - - 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: text - description: | - The dimension or granularity of the metrics. - tests: - - assert_dimension_completeness: - metric_column_names: - - created_guest_journeys_not_cancelled - - started_guest_journeys_not_cancelled - - completed_guest_journeys_not_cancelled - - created_guest_journeys - - started_guest_journeys - - completed_guest_journeys - - count_csat_score - - accepted_values: - values: - - global - - by_deal - - by_has_payment - - by_has_id_check - - by_billing_country - - by_number_of_listings - - - name: dimension_value - data_type: text - description: | - The value or segment available for the selected dimension. - tests: - - not_null - - - name: created_guest_journeys_not_cancelled - data_type: numeric - description: | - Monthly aggregated count of guest journeys created, excluding - cancelled bookings, for a given date, dimension, and value. - tests: - - not_null - - - name: started_guest_journeys_not_cancelled - data_type: numeric - description: | - Monthly aggregated count of guest journeys started, excluding - cancelled bookings, for a given date, dimension, and value. - tests: - - not_null - - - name: completed_guest_journeys_not_cancelled - data_type: numeric - description: | - Monthly aggregated count of guest journeys completed, excluding - cancelled bookings, for a given date, dimension, and value. - tests: - - not_null - - - name: created_guest_journeys - data_type: numeric - description: | - Monthly aggregated count of guest journeys created for a given date, - dimension, and value. - tests: - - not_null - - - name: started_guest_journeys - data_type: numeric - description: | - Monthly aggregated count of guest journeys started for a given date, - dimension, and value. - tests: - - not_null - - - name: completed_guest_journeys - data_type: numeric - description: | - Monthly aggregated count of guest journeys completed for a given date, - dimension, and value. - tests: - - not_null - - - name: count_csat_score - data_type: numeric - description: | - Monthly aggregated count of guest journeys with CSAT - (customer satisfaction score) in a given date, dimension, and value. - - - name: average_csat_score - data_type: numeric - description: | - Monthly aggregated average CSAT score in a given date, - dimension, and value. - tests: - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0 - max_value: 5 - strictly: false - - - name: int_kpis__metric_weekly_check_in_attributed_guest_journeys - description: | - This model computes the Weekly metrics associated with Guest Journeys - attributed to Check-In date at the deepest granularity. - - The unique key corresponds to: - - end_date, - - id_deal, - - has_payment, - - has_id_check, - - active_accommodations_per_deal_segmentation. - - tests: - - dbt_utils.unique_combination_of_columns: - combination_of_columns: - - end_date - - id_deal - - has_payment - - has_id_check - - 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: week - data_type: int - description: ISO week number of the given date. - tests: - - not_null - - - name: id_deal - data_type: character varying - description: Unique identifier of an account. - tests: - - not_null - - - 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 - include Government Id Check for the bookings. - tests: - - not_null - - accepted_values: - values: - - W/O Id Check - - With Id Check - - - name: active_accommodations_per_deal_segmentation - data_type: text - 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: character varying - description: | - Main billing country of the host aggregated at Deal level. - tests: - - not_null - - - name: created_guest_journeys_not_cancelled - data_type: numeric - description: | - Weekly accumulated count of daily guest journeys created, excluding cancelled - bookings, in a given date and per specified dimension. - tests: - - not_null - - - name: started_guest_journeys_not_cancelled - data_type: numeric - description: | - Weekly accumulated count of daily guest journeys started, excluding cancelled - bookings, in a given date and per specified dimension. - tests: - - not_null - - - name: completed_guest_journeys_not_cancelled - data_type: numeric - description: | - Weekly accumulated count of daily guest journeys completed, excluding cancelled - bookings, in a given date and per specified dimension. - tests: - - not_null - - - name: created_guest_journeys - data_type: numeric - description: | - Weekly accumulated count of daily guest journeys created in a given date and - per specified dimension. - tests: - - not_null - - - name: started_guest_journeys - data_type: numeric - description: | - Weekly accumulated count of daily guest journeys started in a given date and - per specified dimension. - tests: - - not_null - - - name: completed_guest_journeys - data_type: numeric - description: | - Weekly accumulated count of daily guest journeys completed in a given date and - per specified dimension. - tests: - - not_null - - - name: count_csat_score - data_type: numeric - description: | - Weekly accumulated count of guest journeys with CSAT - (customer satisfaction score) in a given date, dimension, and value. - - - name: average_csat_score - data_type: numeric - description: | - Weekly accumulated average CSAT score in a given date, dimension, and value. - tests: - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0 - max_value: 5 - strictly: false - - - name: int_kpis__agg_weekly_check_in_attributed_guest_journeys - description: | - This model computes the dimension aggregation for Weekly metrics associated - to Guest Journeys attributed to Check-In date. - - 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: week - data_type: int - description: Week number of the given date. - tests: - - not_null - - - name: dimension - data_type: text - description: | - The dimension or granularity of the metrics. - tests: - - assert_dimension_completeness: - metric_column_names: - - created_guest_journeys_not_cancelled - - started_guest_journeys_not_cancelled - - completed_guest_journeys_not_cancelled - - created_guest_journeys - - started_guest_journeys - - completed_guest_journeys - - count_csat_score - - accepted_values: - values: - - global - - by_deal - - by_has_payment - - by_has_id_check - - by_billing_country - - by_number_of_listings - - - name: dimension_value - data_type: text - description: | - The value or segment available for the selected dimension. - tests: - - not_null - - - name: created_guest_journeys_not_cancelled - data_type: numeric - description: | - Weekly aggregated count of guest journeys created, excluding - cancelled bookings, for a given date, dimension, and value. - tests: - - not_null - - - name: started_guest_journeys_not_cancelled - data_type: numeric - description: | - Weekly aggregated count of guest journeys started, excluding - cancelled bookings, for a given date, dimension, and value. - tests: - - not_null - - - name: completed_guest_journeys_not_cancelled - data_type: numeric - description: | - Weekly aggregated count of guest journeys completed, excluding - cancelled bookings, for a given date, dimension, and value. - tests: - - not_null - - - name: created_guest_journeys - data_type: numeric - description: | - Weekly aggregated count of guest journeys created for a given date, - dimension, and value. - tests: - - not_null - - - name: started_guest_journeys - data_type: numeric - description: | - Weekly aggregated count of guest journeys started for a given date, - dimension, and value. - tests: - - not_null - - - name: completed_guest_journeys - data_type: numeric - description: | - Weekly aggregated count of guest journeys completed for a given date, - dimension, and value. - tests: - - not_null - - - name: count_csat_score - data_type: numeric - description: | - Weekly aggregated count of guest journeys with CSAT - (customer satisfaction score) in a given date, dimension, and value. - - - name: average_csat_score - data_type: numeric - description: | - Weekly aggregated average CSAT score in a given date, - dimension, and value. - tests: - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0 - max_value: 5 - strictly: false - - - name: int_kpis__metric_mtd_check_in_attributed_guest_journeys - description: | - This model computes the Month-To-Date metrics associated with Guest Journeys - attributed to Check-In date at the deepest granularity. - - The unique key corresponds to: - - end_date, - - id_deal, - - has_payment, - - has_id_check, - - active_accommodations_per_deal_segmentation. - - tests: - - dbt_utils.unique_combination_of_columns: - combination_of_columns: - - end_date - - id_deal - - has_payment - - has_id_check - - 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: character varying - description: Unique identifier of an account. - tests: - - not_null - - - 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 - include Government Id Check for the bookings. - tests: - - not_null - - accepted_values: - values: - - W/O Id Check - - With Id Check - - - name: active_accommodations_per_deal_segmentation - data_type: text - 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: character varying - description: | - Main billing country of the host aggregated at Deal level. - tests: - - not_null - - - name: created_guest_journeys_not_cancelled - data_type: numeric - description: | - Month-to-date accumulated count of daily guest journeys created, excluding cancelled - bookings, in a given date and per specified dimension. - tests: - - not_null - - - name: started_guest_journeys_not_cancelled - data_type: numeric - description: | - Month-to-date accumulated count of daily guest journeys started, excluding cancelled - bookings, in a given date and per specified dimension. - tests: - - not_null - - - name: completed_guest_journeys_not_cancelled - data_type: numeric - description: | - Month-to-date accumulated count of daily guest journeys completed, excluding cancelled - bookings, in a given date and per specified dimension. - tests: - - not_null - - - name: created_guest_journeys - data_type: numeric - description: | - Month-to-date accumulated count of daily guest journeys created in a given date and - per specified dimension. - tests: - - not_null - - - name: started_guest_journeys - data_type: numeric - description: | - Month-to-date accumulated count of daily guest journeys started in a given date and - per specified dimension. - tests: - - not_null - - - name: completed_guest_journeys - data_type: numeric - description: | - Month-to-date accumulated count of daily guest journeys completed in a given date and - per specified dimension. - tests: - - not_null - - - name: count_csat_score - data_type: numeric - description: | - Month-to-date accumulated count of guest journeys with CSAT - (customer satisfaction score) in a given date, dimension, and value.. - - - name: average_csat_score - data_type: numeric - description: | - Month-to-date accumulated average CSAT score in a given date, dimension, and value. - tests: - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0 - max_value: 5 - strictly: false - - - name: int_kpis__agg_mtd_check_in_attributed_guest_journeys - description: | - This model computes the dimension aggregation for Month-To-Date metrics associated - to Guest Journeys attributed to Check-In date. - - 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: text - description: | - The dimension or granularity of the metrics. - tests: - - assert_dimension_completeness: - metric_column_names: - - created_guest_journeys_not_cancelled - - started_guest_journeys_not_cancelled - - completed_guest_journeys_not_cancelled - - created_guest_journeys - - started_guest_journeys - - completed_guest_journeys - - count_csat_score - - accepted_values: - values: - - global - - by_deal - - by_has_payment - - by_has_id_check - - by_billing_country - - by_number_of_listings - - - name: dimension_value - data_type: text - description: | - The value or segment available for the selected dimension. - tests: - - not_null - - - name: created_guest_journeys_not_cancelled - data_type: numeric - description: | - Month-to-date aggregated count of guest journeys created, excluding - cancelled bookings, for a given date, dimension, and value. - tests: - - not_null - - - name: started_guest_journeys_not_cancelled - data_type: numeric - description: | - Month-to-date aggregated count of guest journeys started, excluding - cancelled bookings, for a given date, dimension, and value. - tests: - - not_null - - - name: completed_guest_journeys_not_cancelled - data_type: numeric - description: | - Month-to-date aggregated count of guest journeys completed, excluding - cancelled bookings, for a given date, dimension, and value. - tests: - - not_null - - - name: created_guest_journeys - data_type: numeric - description: | - Month-to-date aggregated count of guest journeys created for a given date, - dimension, and value. - tests: - - not_null - - - name: started_guest_journeys - data_type: numeric - description: | - Month-to-date aggregated count of guest journeys started for a given date, - dimension, and value. - tests: - - not_null - - - name: completed_guest_journeys - data_type: numeric - description: | - Month-to-date aggregated count of guest journeys completed for a given date, - dimension, and value. - tests: - - not_null - - - name: count_csat_score - data_type: numeric - description: | - Month-to-date aggregated count of guest journeys with CSAT - (customer satisfaction score) in a given date, dimension, and value. - - - name: average_csat_score - data_type: numeric - description: | - Month-to-date aggregated average CSAT score in a given date, - dimension, and value. - tests: - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0 - max_value: 5 - strictly: false - - name: int_kpis__metric_daily_host_resolutions description: | This model computes the Daily Host Resolutions at the deepest granularity. diff --git a/models/reporting/exposures.yml b/models/reporting/exposures.yml index c0c2235..2f59d79 100644 --- a/models/reporting/exposures.yml +++ b/models/reporting/exposures.yml @@ -271,7 +271,7 @@ exposures: label: Guest KPIs type: dashboard maturity: medium - url: to_be_defined + url: https://app.powerbi.com/groups/me/apps/2464d25c-056c-4b94-9a7f-26b72c7fde33/reports/e0beb7c7-4207-4998-a0e4-e9e3fffd9632/3ab1307b4840da682a9d?ctid=862842df-2998-4826-bea9-b726bc01d3a7&experience=power-bi description: | A PBI report that displays the main KPIs followed by the guest Squad. This includes guest journey metrics and revenue