Changed test

This commit is contained in:
Joaquin Ossa 2024-11-06 11:47:47 +01:00
parent 8c7b4bcf94
commit 51fabf9efb
4 changed files with 389 additions and 25 deletions

View file

@ -513,7 +513,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- created_bookings
- accepted_values:
values:
@ -568,7 +568,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- created_bookings
- accepted_values:
values:
@ -819,7 +819,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- created_guest_journeys
- accepted_values:
values:
@ -873,7 +873,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- created_guest_journeys
- accepted_values:
values:
@ -1123,7 +1123,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- started_guest_journeys
- accepted_values:
values:
@ -1177,7 +1177,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- started_guest_journeys
- accepted_values:
values:
@ -1427,7 +1427,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- completed_guest_journeys
- accepted_values:
values:
@ -1481,7 +1481,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- completed_guest_journeys
- accepted_values:
values:
@ -1731,7 +1731,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- guest_journeys_with_payment
- accepted_values:
values:
@ -1785,7 +1785,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- guest_journeys_with_payment
- accepted_values:
values:
@ -2090,7 +2090,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- deposit_fees_in_gbp
- waiver_payments_in_gbp
- checkin_cover_fees_in_gbp
@ -2167,7 +2167,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- deposit_fees_in_gbp
- waiver_payments_in_gbp
- checkin_cover_fees_in_gbp
@ -2440,7 +2440,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- check_out_bookings
- accepted_values:
values:
@ -2494,7 +2494,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- check_out_bookings
- accepted_values:
values:
@ -2744,7 +2744,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- billable_bookings
- accepted_values:
values:
@ -2798,7 +2798,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- billable_bookings
- accepted_values:
values:
@ -3048,7 +3048,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- cancelled_bookings
- accepted_values:
values:
@ -3102,7 +3102,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- cancelled_bookings
- accepted_values:
values:
@ -3429,7 +3429,7 @@ models:
The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- created_guest_journeys_not_cancelled
- started_guest_journeys_not_cancelled
- completed_guest_journeys_not_cancelled
@ -3518,6 +3518,290 @@ models:
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
@ -3701,7 +3985,7 @@ models:
The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- created_guest_journeys_not_cancelled
- started_guest_journeys_not_cancelled
- completed_guest_journeys_not_cancelled
@ -4039,7 +4323,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- xero_host_resolution_payment_count
- xero_host_resolution_amount_paid_in_gbp
- accepted_values:
@ -4101,7 +4385,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- xero_host_resolution_payment_count
- xero_host_resolution_amount_paid_in_gbp
- accepted_values:
@ -4492,7 +4776,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- xero_booking_net_fees_in_gbp
- xero_listing_net_fees_in_gbp
- xero_verification_net_fees_in_gbp
@ -4599,7 +4883,7 @@ models:
description: The dimension or granularity of the metrics.
tests:
- assert_dimension_completeness:
metric_column_names:
metric_column_names:
- xero_booking_net_fees_in_gbp
- xero_listing_net_fees_in_gbp
- xero_verification_net_fees_in_gbp