diff --git a/macros/business_kpis_configuration.sql b/macros/business_kpis_configuration.sql index 8debdfb..a369d78 100644 --- a/macros/business_kpis_configuration.sql +++ b/macros/business_kpis_configuration.sql @@ -81,16 +81,10 @@ Please note that strings should be encoded with " ' your_value_here ' ", {{ return({"dimension": "'by_dash_source'", "dimension_value": "dash_source"}) }} {% endmacro %} {% macro dim_has_payment() %} - {{ return({ - "dimension": "'by_has_payment'", - "dimension_value": "case when has_payment then 'True' else 'False' end" - }) }} + {{ return({"dimension": "'by_has_payment'", "dimension_value": "has_payment"}) }} {% endmacro %} {% macro dim_has_id_check() %} - {{ return({ - "dimension": "'by_has_id_check'", - "dimension_value": "case when has_id_check then 'True' else 'False' end" - }) }} + {{ return({"dimension": "'by_has_id_check'", "dimension_value": "has_id_check"}) }} {% endmacro %} /* 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 index c2df07a..6544f1c 100644 --- 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 @@ -1,4 +1,4 @@ -{% set dimensions = get_kpi_dimensions_per_model("GUEST_JOURNEY_METRICS") %} +{% set dimensions = get_kpi_dimensions_per_model("CHECK_IN_ATTRIBUTED_GUEST_JOURNEYS") %} {{ config( diff --git a/models/intermediate/kpis/int_kpis__metric_daily_check_in_attributed_guest_journeys.sql b/models/intermediate/kpis/int_kpis__metric_daily_check_in_attributed_guest_journeys.sql index d77ca74..ebbf068 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_check_in_attributed_guest_journeys.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_check_in_attributed_guest_journeys.sql @@ -11,9 +11,9 @@ select b.check_in_date_utc as date, coalesce(icuh.id_deal, 'UNSET') as id_deal, case - when vp.id_verification_to_payment is null then false else true + when vp.id_verification_to_payment is null then 'W/O Payment' else 'With Payment' end as has_payment, - case when v.id_verification is null then false else true end as has_id_check, + case when v.id_verification is null then 'W/O Id Check' else 'With Id Check' end as has_id_check, -- Dimensions -- coalesce( icd.main_billing_country_iso_3_per_deal, 'UNSET' diff --git a/models/intermediate/kpis/schema.yml b/models/intermediate/kpis/schema.yml index aab888d..95e6099 100644 --- a/models/intermediate/kpis/schema.yml +++ b/models/intermediate/kpis/schema.yml @@ -3076,7 +3076,7 @@ models: data_type: bigint description: The month-to-date cancelled bookings for a given date, dimension and value. - - name: int_kpis__metric_daily_check_in_attrib_guest_journeys + - name: int_kpis__metric_daily_check_in_attributed_guest_journeys description: | This model computes Guest Journey metrics at the deepest granularity level for the Guest Products KPIs. @@ -3111,13 +3111,25 @@ models: - not_null - name: has_payment - data_type: boolean - description: True if there has been any guest payments on the guest journey. + 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: boolean - description: True if there verification in the guest journey + 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: active_accommodations_per_deal_segmentation data_type: string @@ -3178,7 +3190,7 @@ models: Count of daily guest journeys completed in a given date and per specified dimension. - - name: int_kpis__metric_monthly_check_in_attrib_guest_journeys + - 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. @@ -3221,17 +3233,25 @@ models: - not_null - name: has_payment - data_type: boolean - description: True if there has been any guest payments on the guest journey. + 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: boolean - description: True if the verification in the guest journey includes - Government ID Check for the bookings. + 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: active_accommodations_per_deal_segmentation data_type: text @@ -3304,7 +3324,7 @@ models: tests: - not_null - - name: int_kpis__agg_monthly_check_in_attrib_guest_journeys + - 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. @@ -3412,7 +3432,7 @@ models: tests: - not_null - - name: int_kpis__metric_mtd_check_in_attrib_guest_journeys + - 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. @@ -3455,17 +3475,25 @@ models: - not_null - name: has_payment - data_type: boolean - description: True if there has been any guest payments on the guest journey. + 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: boolean - description: True if the verification in the guest journey includes - Government ID Check for the bookings. + 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: active_accommodations_per_deal_segmentation data_type: text @@ -3538,7 +3566,7 @@ models: tests: - not_null - - name: int_kpis__agg_mtd_check_in_attrib_guest_journeys + - 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.