Fixed names

This commit is contained in:
Joaquin 2024-11-04 15:28:31 +01:00
parent 64c3c6d1f0
commit d952613fd3
4 changed files with 52 additions and 30 deletions

View file

@ -81,16 +81,10 @@ Please note that strings should be encoded with " ' your_value_here ' ",
{{ return({"dimension": "'by_dash_source'", "dimension_value": "dash_source"}) }} {{ return({"dimension": "'by_dash_source'", "dimension_value": "dash_source"}) }}
{% endmacro %} {% endmacro %}
{% macro dim_has_payment() %} {% macro dim_has_payment() %}
{{ return({ {{ return({"dimension": "'by_has_payment'", "dimension_value": "has_payment"}) }}
"dimension": "'by_has_payment'",
"dimension_value": "case when has_payment then 'True' else 'False' end"
}) }}
{% endmacro %} {% endmacro %}
{% macro dim_has_id_check() %} {% macro dim_has_id_check() %}
{{ return({ {{ return({"dimension": "'by_has_id_check'", "dimension_value": "has_id_check"}) }}
"dimension": "'by_has_id_check'",
"dimension_value": "case when has_id_check then 'True' else 'False' end"
}) }}
{% endmacro %} {% endmacro %}
/* /*

View file

@ -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( config(

View file

@ -11,9 +11,9 @@ select
b.check_in_date_utc as date, b.check_in_date_utc as date,
coalesce(icuh.id_deal, 'UNSET') as id_deal, coalesce(icuh.id_deal, 'UNSET') as id_deal,
case 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, 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 -- -- Dimensions --
coalesce( coalesce(
icd.main_billing_country_iso_3_per_deal, 'UNSET' icd.main_billing_country_iso_3_per_deal, 'UNSET'

View file

@ -3076,7 +3076,7 @@ models:
data_type: bigint data_type: bigint
description: The month-to-date cancelled bookings for a given date, dimension and value. 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: | description: |
This model computes Guest Journey metrics at the deepest granularity This model computes Guest Journey metrics at the deepest granularity
level for the Guest Products KPIs. level for the Guest Products KPIs.
@ -3111,13 +3111,25 @@ models:
- not_null - not_null
- name: has_payment - name: has_payment
data_type: boolean data_type: string
description: True if there has been any guest payments on the guest journey. 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 - name: has_id_check
data_type: boolean data_type: string
description: True if there verification in the guest journey description: Does the verification in the guest journey
includes Government Id Check for the bookings. 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 - name: active_accommodations_per_deal_segmentation
data_type: string data_type: string
@ -3178,7 +3190,7 @@ models:
Count of daily guest journeys completed in a given date and Count of daily guest journeys completed in a given date and
per specified dimension. per specified dimension.
- name: int_kpis__metric_monthly_check_in_attrib_guest_journeys - name: int_kpis__metric_monthly_check_in_attributed_guest_journeys
description: | description: |
This model computes the Monthly metrics associated with Guest Journeys This model computes the Monthly metrics associated with Guest Journeys
attributed to Check-In date at the deepest granularity. attributed to Check-In date at the deepest granularity.
@ -3221,17 +3233,25 @@ models:
- not_null - not_null
- name: has_payment - name: has_payment
data_type: boolean data_type: string
description: True if there has been any guest payments on the guest journey. description: Has there been any guest payments on the guest journey.
tests: tests:
- not_null - not_null
- accepted_values:
values:
- W/O Payment
- With Payment
- name: has_id_check - name: has_id_check
data_type: boolean data_type: string
description: True if the verification in the guest journey includes description: Does the verification in the guest journey
Government ID Check for the bookings. includes Government Id Check for the bookings.
tests: tests:
- not_null - not_null
- accepted_values:
values:
- W/O Id Check
- With Id Check
- name: active_accommodations_per_deal_segmentation - name: active_accommodations_per_deal_segmentation
data_type: text data_type: text
@ -3304,7 +3324,7 @@ models:
tests: tests:
- not_null - not_null
- name: int_kpis__agg_monthly_check_in_attrib_guest_journeys - name: int_kpis__agg_monthly_check_in_attributed_guest_journeys
description: | description: |
This model computes the dimension aggregation for Monthly metrics associated This model computes the dimension aggregation for Monthly metrics associated
to Guest Journeys attributed to Check-In date. to Guest Journeys attributed to Check-In date.
@ -3412,7 +3432,7 @@ models:
tests: tests:
- not_null - not_null
- name: int_kpis__metric_mtd_check_in_attrib_guest_journeys - name: int_kpis__metric_mtd_check_in_attributed_guest_journeys
description: | description: |
This model computes the Month-To-Date metrics associated with Guest Journeys This model computes the Month-To-Date metrics associated with Guest Journeys
attributed to Check-In date at the deepest granularity. attributed to Check-In date at the deepest granularity.
@ -3455,17 +3475,25 @@ models:
- not_null - not_null
- name: has_payment - name: has_payment
data_type: boolean data_type: string
description: True if there has been any guest payments on the guest journey. description: Has there been any guest payments on the guest journey.
tests: tests:
- not_null - not_null
- accepted_values:
values:
- W/O Payment
- With Payment
- name: has_id_check - name: has_id_check
data_type: boolean data_type: string
description: True if the verification in the guest journey includes description: Does the verification in the guest journey
Government ID Check for the bookings. includes Government Id Check for the bookings.
tests: tests:
- not_null - not_null
- accepted_values:
values:
- W/O Id Check
- With Id Check
- name: active_accommodations_per_deal_segmentation - name: active_accommodations_per_deal_segmentation
data_type: text data_type: text
@ -3538,7 +3566,7 @@ models:
tests: tests:
- not_null - not_null
- name: int_kpis__agg_mtd_check_in_attrib_guest_journeys - name: int_kpis__agg_mtd_check_in_attributed_guest_journeys
description: | description: |
This model computes the dimension aggregation for Month-To-Date metrics associated This model computes the dimension aggregation for Month-To-Date metrics associated
to Guest Journeys attributed to Check-In date. to Guest Journeys attributed to Check-In date.