Merged PR 4425: Reworks Billable Bookings metrics

# Description

Changes:
* On Est. Billable Bookings, keeps previous logic for Old Dash while assuming the first billable service for New Dash
* Adds a Billable Check Out Bookings in Check Out bookings, as defined in the requirements.

# 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: #27619
This commit is contained in:
Oriol Roqué Paniagua 2025-02-17 15:59:21 +00:00
parent a3793121af
commit 9540f18562
11 changed files with 110 additions and 24 deletions

View file

@ -97,6 +97,7 @@ select
check_out_bookings.check_out_bookings,
check_out_bookings.cancelled_check_out_bookings,
check_out_bookings.not_cancelled_check_out_bookings,
check_out_bookings.billable_check_out_bookings,
check_out_bookings.cancelled_check_out_bookings_rate,
-- OTHER BOOKINGS --

View file

@ -53,6 +53,15 @@
"number_format": "integer",
"increment_sign_format": "positive",
},
{
"order_by": 8,
"metric": "Billable Check Out Bookings",
"value": "billable_check_out_bookings",
"previous_year_value": "previous_year_billable_check_out_bookings",
"relative_increment": "relative_increment_billable_check_out_bookings",
"number_format": "integer",
"increment_sign_format": "positive",
},
{
"order_by": 9,
"metric": "Est. Billable Bookings",

View file

@ -36,16 +36,12 @@ with
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country', 'by_business_scope')
and dimension_value <> 'UNSET'
-- TEMPORARY EXCLUDE NEW DASH BILLABLE BOOKINGS
and dimension_value <> 'New Dash'
union all
select *
from {{ ref("int_kpis__agg_monthly_billable_bookings") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country', 'by_business_scope')
and dimension_value <> 'UNSET'
-- TEMPORARY EXCLUDE NEW DASH BILLABLE BOOKINGS
and dimension_value <> 'New Dash'
),
created_guest_journeys as (
select *
@ -193,6 +189,7 @@ with
check_out_bookings.check_out_bookings,
check_out_bookings.cancelled_check_out_bookings,
check_out_bookings.not_cancelled_check_out_bookings,
check_out_bookings.billable_check_out_bookings,
check_out_bookings.cancelled_check_out_bookings_rate,
-- OTHER BOOKINGS --
@ -480,6 +477,7 @@ select
{{ calculate_safe_relative_increment("check_out_bookings") }},
{{ calculate_safe_relative_increment("cancelled_check_out_bookings") }},
{{ calculate_safe_relative_increment("not_cancelled_check_out_bookings") }},
{{ calculate_safe_relative_increment("billable_check_out_bookings") }},
{{ calculate_safe_relative_increment("cancelled_check_out_bookings_rate") }},
-- OTHER BOOKINGS --