From 78707ef649a4d0b3bfc1af71eb037aa2b3b0997e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Roqu=C3=A9=20Paniagua?= Date: Tue, 11 Feb 2025 16:19:33 +0000 Subject: [PATCH] Merged PR 4352: Bulk update dash_source to business_scope # Description Changes: * Switches dash_source to business_scope in all kpis models, schema and macro configuration. # 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 --- macros/business_kpis_configuration.sql | 10 +- ..._kpis__metric_daily_check_out_bookings.sql | 4 +- ..._metric_daily_completed_guest_journeys.sql | 4 +- ...nt_kpis__metric_daily_created_bookings.sql | 4 +- ...s__metric_daily_created_guest_journeys.sql | 4 +- ...tric_daily_guest_journeys_with_payment.sql | 4 +- .../int_kpis__metric_daily_guest_payments.sql | 4 +- ...s__metric_daily_started_guest_journeys.sql | 4 +- ...pis__metric_monthly_check_out_bookings.sql | 4 +- ...etric_monthly_completed_guest_journeys.sql | 4 +- ..._kpis__metric_monthly_created_bookings.sql | 4 +- ..._metric_monthly_created_guest_journeys.sql | 4 +- ...ic_monthly_guest_journeys_with_payment.sql | 4 +- ...nt_kpis__metric_monthly_guest_payments.sql | 4 +- ..._metric_monthly_started_guest_journeys.sql | 4 +- ...nt_kpis__metric_mtd_check_out_bookings.sql | 4 +- ...s__metric_mtd_completed_guest_journeys.sql | 4 +- .../int_kpis__metric_mtd_created_bookings.sql | 4 +- ...pis__metric_mtd_created_guest_journeys.sql | 4 +- ...metric_mtd_guest_journeys_with_payment.sql | 4 +- .../int_kpis__metric_mtd_guest_payments.sql | 4 +- ...pis__metric_mtd_started_guest_journeys.sql | 4 +- models/intermediate/kpis/schema.yml | 301 +++++++++++------- 23 files changed, 231 insertions(+), 164 deletions(-) diff --git a/macros/business_kpis_configuration.sql b/macros/business_kpis_configuration.sql index 7e86510..54fae35 100644 --- a/macros/business_kpis_configuration.sql +++ b/macros/business_kpis_configuration.sql @@ -56,8 +56,12 @@ Please note that strings should be encoded with " ' your_value_here ' ", {% macro dim_deal() %} {{ return({"dimension": "'by_deal'", "dimension_value": "id_deal"}) }} {% endmacro %} -{% macro dim_dash() %} - {{ return({"dimension": "'by_dash_source'", "dimension_value": "dash_source"}) }} +{% macro dim_business_scope() %} + {{ + return( + {"dimension": "'by_business_scope'", "dimension_value": "business_scope"} + ) + }} {% endmacro %} {% macro dim_has_payment() %} {{ return({"dimension": "'by_has_payment'", "dimension_value": "has_payment"}) }} @@ -140,7 +144,7 @@ Provides a general assignement for the Dimensions available for each KPI "GUEST_PAYMENTS", "STARTED_GUEST_JOURNEYS", ] %} - {% set additional_dimensions = additional_dimensions + [dim_dash()] %} + {% set additional_dimensions = additional_dimensions + [dim_business_scope()] %} {% endif %} {% if entity_name == "CHECK_IN_ATTRIBUTED_GUEST_JOURNEYS" %} diff --git a/models/intermediate/kpis/int_kpis__metric_daily_check_out_bookings.sql b/models/intermediate/kpis/int_kpis__metric_daily_check_out_bookings.sql index eb5f808..f04a2c8 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_check_out_bookings.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_check_out_bookings.sql @@ -1,11 +1,11 @@ -{{ config(materialized="table", unique_key=["date", "id_deal", "dash_source"]) }} +{{ config(materialized="table", unique_key=["date", "id_deal", "business_scope"]) }} select -- Unique Key -- icb.check_out_date_utc as date, coalesce(icuh.id_deal, 'UNSET') as id_deal, case when icbs.id_booking is not null then 'New Dash' else 'Old Dash' - end as dash_source, + end as business_scope, -- Dimensions -- coalesce( icd.main_billing_country_iso_3_per_deal, 'UNSET' diff --git a/models/intermediate/kpis/int_kpis__metric_daily_completed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_daily_completed_guest_journeys.sql index eb8655f..9ef6c9b 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_completed_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_completed_guest_journeys.sql @@ -1,11 +1,11 @@ -{{ config(materialized="table", unique_key=["date", "id_deal", "dash_source"]) }} +{{ config(materialized="table", unique_key=["date", "id_deal", "business_scope"]) }} select -- Unique Key -- icvr.verification_estimated_completed_date_utc as date, coalesce(icuh.id_deal, 'UNSET') as id_deal, case when icbs.id_booking is not null then 'New Dash' else 'Old Dash' - end as dash_source, + end as business_scope, -- Dimensions -- coalesce( icd.main_billing_country_iso_3_per_deal, 'UNSET' diff --git a/models/intermediate/kpis/int_kpis__metric_daily_created_bookings.sql b/models/intermediate/kpis/int_kpis__metric_daily_created_bookings.sql index cb1c898..77d4629 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_created_bookings.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_created_bookings.sql @@ -1,11 +1,11 @@ -{{ config(materialized="table", unique_key=["date", "id_deal", "dash_source"]) }} +{{ config(materialized="table", unique_key=["date", "id_deal", "business_scope"]) }} select -- Unique Key -- icb.created_date_utc as date, coalesce(icuh.id_deal, 'UNSET') as id_deal, case when icbs.id_booking is not null then 'New Dash' else 'Old Dash' - end as dash_source, + end as business_scope, -- Dimensions -- coalesce( icd.main_billing_country_iso_3_per_deal, 'UNSET' diff --git a/models/intermediate/kpis/int_kpis__metric_daily_created_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_daily_created_guest_journeys.sql index 2c344f1..f9da17e 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_created_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_created_guest_journeys.sql @@ -1,11 +1,11 @@ -{{ config(materialized="table", unique_key=["date", "id_deal", "dash_source"]) }} +{{ config(materialized="table", unique_key=["date", "id_deal", "business_scope"]) }} select -- Unique Key -- icvr.created_date_utc as date, coalesce(icuh.id_deal, 'UNSET') as id_deal, case when icbs.id_booking is not null then 'New Dash' else 'Old Dash' - end as dash_source, + end as business_scope, -- Dimensions -- coalesce( icd.main_billing_country_iso_3_per_deal, 'UNSET' diff --git a/models/intermediate/kpis/int_kpis__metric_daily_guest_journeys_with_payment.sql b/models/intermediate/kpis/int_kpis__metric_daily_guest_journeys_with_payment.sql index 1e45268..2f5abf5 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_guest_journeys_with_payment.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_guest_journeys_with_payment.sql @@ -1,4 +1,4 @@ -{{ config(materialized="table", unique_key=["date", "id_deal"]) }} +{{ config(materialized="table", unique_key=["date", "id_deal", "business_scope"]) }} with first_payment_per_verification_request as ( select @@ -16,7 +16,7 @@ select coalesce(icuh.id_deal, 'UNSET') as id_deal, case when icbs.id_booking is not null then 'New Dash' else 'Old Dash' - end as dash_source, + end as business_scope, -- Dimensions -- coalesce( icd.main_billing_country_iso_3_per_deal, 'UNSET' diff --git a/models/intermediate/kpis/int_kpis__metric_daily_guest_payments.sql b/models/intermediate/kpis/int_kpis__metric_daily_guest_payments.sql index 77eb451..b1acc4e 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_guest_payments.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_guest_payments.sql @@ -6,7 +6,7 @@ {{ config( materialized="table", - unique_key=["date", "id_deal", "dash_source", "has_id_check"], + unique_key=["date", "id_deal", "business_scope", "has_id_check"], ) }} @@ -16,7 +16,7 @@ select coalesce(icuh.id_deal, 'UNSET') as id_deal, case when icbs.id_booking is not null then 'New Dash' else 'Old Dash' - end as dash_source, + end as business_scope, case when icv.id_verification is null then 'W/O Id Check' else 'With Id Check' end as has_id_check, diff --git a/models/intermediate/kpis/int_kpis__metric_daily_started_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_daily_started_guest_journeys.sql index 47c099b..0c15e56 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_started_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_started_guest_journeys.sql @@ -1,11 +1,11 @@ -{{ config(materialized="table", unique_key=["date", "id_deal", "dash_source"]) }} +{{ config(materialized="table", unique_key=["date", "id_deal", "business_scope"]) }} select -- Unique Key -- icvr.verification_estimated_started_date_utc as date, coalesce(icuh.id_deal, 'UNSET') as id_deal, case when icbs.id_booking is not null then 'New Dash' else 'Old Dash' - end as dash_source, + end as business_scope, -- Dimensions -- coalesce( icd.main_billing_country_iso_3_per_deal, 'UNSET' diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_check_out_bookings.sql b/models/intermediate/kpis/int_kpis__metric_monthly_check_out_bookings.sql index d3e2157..fdff555 100644 --- a/models/intermediate/kpis/int_kpis__metric_monthly_check_out_bookings.sql +++ b/models/intermediate/kpis/int_kpis__metric_monthly_check_out_bookings.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, b.id_deal, - b.dash_source, + b.business_scope, b.active_accommodations_per_deal_segmentation, -- Dimensions -- b.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_completed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_monthly_completed_guest_journeys.sql index 5abdce0..86aca1e 100644 --- a/models/intermediate/kpis/int_kpis__metric_monthly_completed_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_monthly_completed_guest_journeys.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, gj.id_deal, - gj.dash_source, + gj.business_scope, gj.active_accommodations_per_deal_segmentation, -- Dimensions -- gj.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_created_bookings.sql b/models/intermediate/kpis/int_kpis__metric_monthly_created_bookings.sql index f5fb207..29fe048 100644 --- a/models/intermediate/kpis/int_kpis__metric_monthly_created_bookings.sql +++ b/models/intermediate/kpis/int_kpis__metric_monthly_created_bookings.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, b.id_deal, - b.dash_source, + b.business_scope, b.active_accommodations_per_deal_segmentation, -- Dimensions -- b.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_created_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_monthly_created_guest_journeys.sql index 4734d9c..7b568f3 100644 --- a/models/intermediate/kpis/int_kpis__metric_monthly_created_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_monthly_created_guest_journeys.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, gj.id_deal, - gj.dash_source, + gj.business_scope, gj.active_accommodations_per_deal_segmentation, -- Dimensions -- gj.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_guest_journeys_with_payment.sql b/models/intermediate/kpis/int_kpis__metric_monthly_guest_journeys_with_payment.sql index 3294f90..18e2385 100644 --- a/models/intermediate/kpis/int_kpis__metric_monthly_guest_journeys_with_payment.sql +++ b/models/intermediate/kpis/int_kpis__metric_monthly_guest_journeys_with_payment.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, gj.id_deal, - gj.dash_source, + gj.business_scope, gj.active_accommodations_per_deal_segmentation, -- Dimensions -- gj.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_guest_payments.sql b/models/intermediate/kpis/int_kpis__metric_monthly_guest_payments.sql index aa58efa..46e760e 100644 --- a/models/intermediate/kpis/int_kpis__metric_monthly_guest_payments.sql +++ b/models/intermediate/kpis/int_kpis__metric_monthly_guest_payments.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "has_id_check", "active_accommodations_per_deal_segmentation", ], @@ -16,7 +16,7 @@ select d.first_day_month as start_date, d.date as end_date, gp.id_deal, - gp.dash_source, + gp.business_scope, gp.has_id_check, gp.active_accommodations_per_deal_segmentation, -- Dimensions -- diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_started_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_monthly_started_guest_journeys.sql index f8495f1..8825b92 100644 --- a/models/intermediate/kpis/int_kpis__metric_monthly_started_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_monthly_started_guest_journeys.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, gj.id_deal, - gj.dash_source, + gj.business_scope, gj.active_accommodations_per_deal_segmentation, -- Dimensions -- gj.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_check_out_bookings.sql b/models/intermediate/kpis/int_kpis__metric_mtd_check_out_bookings.sql index e58800b..8a85fc5 100644 --- a/models/intermediate/kpis/int_kpis__metric_mtd_check_out_bookings.sql +++ b/models/intermediate/kpis/int_kpis__metric_mtd_check_out_bookings.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, b.id_deal, - b.dash_source, + b.business_scope, b.active_accommodations_per_deal_segmentation, -- Dimensions -- b.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_completed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_mtd_completed_guest_journeys.sql index 90d9d70..91d9ca8 100644 --- a/models/intermediate/kpis/int_kpis__metric_mtd_completed_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_mtd_completed_guest_journeys.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, gj.id_deal, - gj.dash_source, + gj.business_scope, gj.active_accommodations_per_deal_segmentation, -- Dimensions -- gj.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_created_bookings.sql b/models/intermediate/kpis/int_kpis__metric_mtd_created_bookings.sql index 3743832..9d24421 100644 --- a/models/intermediate/kpis/int_kpis__metric_mtd_created_bookings.sql +++ b/models/intermediate/kpis/int_kpis__metric_mtd_created_bookings.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, b.id_deal, - b.dash_source, + b.business_scope, b.active_accommodations_per_deal_segmentation, -- Dimensions -- b.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_created_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_mtd_created_guest_journeys.sql index fd60d12..4686345 100644 --- a/models/intermediate/kpis/int_kpis__metric_mtd_created_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_mtd_created_guest_journeys.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, gj.id_deal, - gj.dash_source, + gj.business_scope, gj.active_accommodations_per_deal_segmentation, -- Dimensions -- gj.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_guest_journeys_with_payment.sql b/models/intermediate/kpis/int_kpis__metric_mtd_guest_journeys_with_payment.sql index 7d258d7..61291cb 100644 --- a/models/intermediate/kpis/int_kpis__metric_mtd_guest_journeys_with_payment.sql +++ b/models/intermediate/kpis/int_kpis__metric_mtd_guest_journeys_with_payment.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, gj.id_deal, - gj.dash_source, + gj.business_scope, gj.active_accommodations_per_deal_segmentation, -- Dimensions -- gj.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_guest_payments.sql b/models/intermediate/kpis/int_kpis__metric_mtd_guest_payments.sql index 2f4bff5..d088794 100644 --- a/models/intermediate/kpis/int_kpis__metric_mtd_guest_payments.sql +++ b/models/intermediate/kpis/int_kpis__metric_mtd_guest_payments.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "has_id_check", "active_accommodations_per_deal_segmentation", ], @@ -16,7 +16,7 @@ select d.first_day_month as start_date, d.date as end_date, gp.id_deal, - gp.dash_source, + gp.business_scope, gp.has_id_check, gp.active_accommodations_per_deal_segmentation, -- Dimensions -- diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_started_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_mtd_started_guest_journeys.sql index b60c061..84a37b1 100644 --- a/models/intermediate/kpis/int_kpis__metric_mtd_started_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_mtd_started_guest_journeys.sql @@ -4,7 +4,7 @@ unique_key=[ "end_date", "id_deal", - "dash_source", + "business_scope", "active_accommodations_per_deal_segmentation", ], ) @@ -15,7 +15,7 @@ select d.first_day_month as start_date, d.date as end_date, gj.id_deal, - gj.dash_source, + gj.business_scope, gj.active_accommodations_per_deal_segmentation, -- Dimensions -- gj.main_billing_country_iso_3_per_deal, diff --git a/models/intermediate/kpis/schema.yml b/models/intermediate/kpis/schema.yml index 687be83..358db28 100644 --- a/models/intermediate/kpis/schema.yml +++ b/models/intermediate/kpis/schema.yml @@ -566,14 +566,14 @@ models: in this case: - date, - id_deal, - - dash_source. + - business_scope. data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date - id_deal - - dash_source + - business_scope columns: - name: date @@ -588,15 +588,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -649,7 +652,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -657,7 +660,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -681,15 +684,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -743,7 +749,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -751,7 +757,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -775,15 +781,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -870,7 +879,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -942,7 +951,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -978,14 +987,14 @@ models: in this case: - date, - id_deal, - - dash_source + - business_scope data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date - id_deal - - dash_source + - business_scope columns: - name: date @@ -1000,15 +1009,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -1049,7 +1061,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -1057,7 +1069,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -1081,15 +1093,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -1131,7 +1146,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -1139,7 +1154,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -1163,15 +1178,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -1244,7 +1262,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -1299,7 +1317,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -1320,14 +1338,14 @@ models: in this case: - date, - id_deal, - - dash_source + - business_scope data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date - id_deal - - dash_source + - business_scope columns: - name: date @@ -1342,15 +1360,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -1391,7 +1412,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -1399,7 +1420,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -1423,15 +1444,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -1473,7 +1497,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -1481,7 +1505,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -1505,15 +1529,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -1586,7 +1613,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -1641,7 +1668,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -1662,14 +1689,14 @@ models: in this case: - date, - id_deal, - - dash_source. + - business_scope. data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date - id_deal - - dash_source + - business_scope columns: - name: date @@ -1684,15 +1711,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -1733,7 +1763,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -1741,7 +1771,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -1765,15 +1795,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -1815,7 +1848,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -1823,7 +1856,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -1847,15 +1880,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -1928,7 +1964,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -1983,7 +2019,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -2004,14 +2040,14 @@ models: in this case: - date, - id_deal, - - dash_source + - business_scope data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date - id_deal - - dash_source + - business_scope columns: - name: date @@ -2026,15 +2062,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -2075,7 +2114,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -2083,7 +2122,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -2107,15 +2146,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -2157,7 +2199,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -2165,7 +2207,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -2189,15 +2231,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -2270,7 +2315,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -2325,7 +2370,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -2347,7 +2392,7 @@ models: - date, - id_deal, - has_id_check, - - dash_source + - business_scope data_tests: - dbt_utils.unique_combination_of_columns: @@ -2355,7 +2400,7 @@ models: - date - id_deal - has_id_check - - dash_source + - business_scope columns: - name: date @@ -2370,15 +2415,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: has_id_check data_type: string @@ -2449,7 +2497,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - has_id_check, - active_accommodations_per_deal_segmentation. @@ -2458,7 +2506,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - has_id_check - active_accommodations_per_deal_segmentation @@ -2483,15 +2531,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: has_id_check data_type: string @@ -2562,7 +2613,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - has_id_check, - active_accommodations_per_deal_segmentation. @@ -2571,7 +2622,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - has_id_check - active_accommodations_per_deal_segmentation @@ -2596,15 +2647,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: has_id_check data_type: string @@ -2709,7 +2763,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - by_has_id_check @@ -2788,7 +2842,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - by_has_id_check @@ -2830,14 +2884,14 @@ models: in this case: - date, - id_deal, - - dash_source. + - business_scope. data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date - id_deal - - dash_source + - business_scope columns: - name: date @@ -2852,15 +2906,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -2913,7 +2970,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -2921,7 +2978,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -2945,15 +3002,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -3007,7 +3067,7 @@ models: The unique key corresponds to: - end_date, - id_deal, - - dash_source, + - business_scope, - active_accommodations_per_deal_segmentation. data_tests: @@ -3015,7 +3075,7 @@ models: combination_of_columns: - end_date - id_deal - - dash_source + - business_scope - active_accommodations_per_deal_segmentation columns: @@ -3039,15 +3099,18 @@ models: data_tests: - not_null - - name: dash_source + - name: business_scope data_type: string - description: Dashboard source, either old or new. + description: | + Business scope identifying the metric source. data_tests: - not_null - accepted_values: values: - - "New Dash" - "Old Dash" + - "New Dash" + - "API" + - "UNSET" - name: active_accommodations_per_deal_segmentation data_type: string @@ -3134,7 +3197,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value @@ -3206,7 +3269,7 @@ models: - global - by_number_of_listings - by_billing_country - - by_dash_source + - by_business_scope - by_deal - name: dimension_value