Merged PR 5333: Reporting version of Stay Disrupt Conversion Funnel

# Description

Reporting version of Stay Disrupt Conversion Funnel. It's just a copy from the intermediate model.

# 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: #30277
This commit is contained in:
Oriol Roqué Paniagua 2025-05-29 14:57:07 +00:00
parent 5ddba42e12
commit a9a1e68624
2 changed files with 142 additions and 0 deletions

View file

@ -2388,3 +2388,129 @@ models:
during onboarding.
data_tests:
- not_null
- name: stay_disrupt_conversion_funnel
description: |
This model tracks the conversion funnel of the Stay Disrupt product.
Data is aggregated in a monthly basis, up to yesterday.
There's 2 funnels tracked:
- At Account level
- At Guest Journey level
data_tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- month_start_date
- guest_product_name
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- month_start_date
- guest_product_latest_display_name
columns:
- name: month_start_date
data_type: date
description: |
Start date of the month for which the funnel is computed.
Corresponds to the first day of the month.
data_tests:
- not_null
- name: guest_product_name
data_type: string
description: |
Internal name of the guest product, ex: STAYDISRUPT. Use this for filtering.
It cannot be null.
data_tests:
- not_null
- name: guest_product_latest_display_name
data_type: string
description: |
Latest display name of the guest product. This is the name that
should be used for display purposes, ex: Confident Stay.
data_tests:
- not_null
- name: count_active_accounts
data_type: integer
description: |
Count of accounts that have been active in the month. It doesn't
necessarily mean that these offer the guest product.
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: true
- name: count_active_accounts_with_guest_product_offered
data_type: integer
description: |
Count of accounts that have been active in the month and that offered
the guest product via Guest Journey that month.
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: count_active_accounts
strictly: false
- name: count_active_accounts_with_guest_product_payments
data_type: integer
description: |
Count of accounts that have been active in the month and that had at
least one payment for the guest product via Guest Journey that month.
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: count_active_accounts
strictly: false
- name: count_guest_journeys_started
data_type: integer
description: |
Count of Guest Journeys that have been started in the month.
It cannot be null.
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: false
- name: count_guest_journeys_started_with_guest_product_offered
data_type: integer
description: |
Count of Guest Journeys that have been started in the month and that
offered the guest product via Guest Journey that month.
It cannot be null.
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: count_guest_journeys_started
strictly: false
- name: count_guest_product_payments
data_type: integer
description: |
Count of Guest Journeys that have been started in the month and that
had at least one payment for the guest product via Guest Journey that month.
It cannot be null.
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: count_guest_journeys_started
strictly: false
- name: sum_amount_paid_without_taxes_in_gbp
data_type: decimal
description: |
Sum of the amount paid for the guest product via Guest Journey in GBP,
without taxes.
It cannot be null.
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: false

View file

@ -0,0 +1,16 @@
with
int_stay_disrupt_conversion_funnel as (
select * from {{ ref("int_stay_disrupt_conversion_funnel") }}
)
select
month_start_date,
guest_product_name,
guest_product_latest_display_name,
count_active_accounts,
count_active_accounts_with_guest_product_offered,
count_active_accounts_with_guest_product_payments,
count_guest_journeys_started,
count_guest_journeys_started_with_guest_product_offered,
count_guest_product_payments,
sum_amount_paid_without_taxes_in_gbp
from int_stay_disrupt_conversion_funnel