Merged PR 4727: Bookings fees are now Old Dashboard Booking Fees in Main KPIs

# Description

Booking fees is widely used with different meanings, for old dash, for new dash, for both, etc. This is painful. First step to align on a proper naming is ensure that what we report in Main KPIs is clearly stated, which in this case, Booking Fees are now called Old Dashboard Booking Fees.

Changes:
* Modify `stg_seed__accounting_aggregations` seed to rename Booking Fees to Old Dashboard Booking Fees. This is for us to clarify. This is only applied for KPIs compute. I also added an empty space that I mistakenly forgot in the past for `financial_l3_aggregation`.
* Modify KPIs source, i.e., `int_kpis__metric_daily_invoiced_revenue`. Here I forcefully modify the name of the field to `xero_old_dashboard_booking_net_fees_in_gbp`.
* Propagate changes of downstream usages of `xero_booking_net_fees_in_gbp` to `xero_old_dashboard_booking_net_fees_in_gbp`. This affects all models, including the reporting model. On this one we still have both names to avoid breaking it. I will need to modify the data glossary in PBI anyway so I'll do this change as well.
* Modify displayed metric name from Booking Fees Revenue to Old Dashboard Booking Fees Revenue.
* Modify schema so it reflects the proper names, descriptions, and tests.
* Ensure outlier and completion tests still work after this change.

I confirm the field `xero_booking_net_fees_in_gbp` does not exist anymore in the rest of DWH after these changes, except for the abovementioned comment on the reporting line.

# 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: #28560
This commit is contained in:
Oriol Roqué Paniagua 2025-03-18 14:55:32 +00:00
parent 35cd4f4fcd
commit f799a8d30f
14 changed files with 52 additions and 36 deletions

View file

@ -154,7 +154,7 @@ select
-- HOST (OPERATOR) REVENUE --
-- OLD DASH --
invoiced_revenue.xero_booking_net_fees_in_gbp,
invoiced_revenue.xero_old_dashboard_booking_net_fees_in_gbp,
invoiced_revenue.xero_listing_net_fees_in_gbp,
invoiced_revenue.xero_verification_net_fees_in_gbp,
-- NEW DASH --

View file

@ -424,10 +424,10 @@
},
{
"order_by": 225,
"metric": "Invoiced Booking Fees Revenue",
"value": "xero_booking_net_fees_in_gbp",
"previous_year_value": "previous_year_xero_booking_net_fees_in_gbp",
"relative_increment": "relative_increment_xero_booking_net_fees_in_gbp",
"metric": "Invoiced Old Dashboard Booking Fees Revenue",
"value": "xero_old_dashboard_booking_net_fees_in_gbp",
"previous_year_value": "previous_year_xero_old_dashboard_booking_net_fees_in_gbp",
"relative_increment": "relative_increment_xero_old_dashboard_booking_net_fees_in_gbp",
"number_format": "currency_gbp",
"increment_sign_format": "positive",
},

View file

@ -240,7 +240,7 @@ with
-- HOST (OPERATOR) REVENUE --
-- OLD DASH --
invoiced_revenue.xero_booking_net_fees_in_gbp,
invoiced_revenue.xero_old_dashboard_booking_net_fees_in_gbp,
invoiced_revenue.xero_listing_net_fees_in_gbp,
invoiced_revenue.xero_verification_net_fees_in_gbp,
-- NEW DASH --
@ -521,7 +521,7 @@ select
-- HOST (OPERATOR) REVENUE --
-- OLD DASH --
{{ calculate_safe_relative_increment("xero_booking_net_fees_in_gbp") }},
{{ calculate_safe_relative_increment("xero_old_dashboard_booking_net_fees_in_gbp") }},
{{ calculate_safe_relative_increment("xero_listing_net_fees_in_gbp") }},
{{ calculate_safe_relative_increment("xero_verification_net_fees_in_gbp") }},
-- NEW DASH --

View file

@ -33,7 +33,9 @@
sum(
xero_basic_screening_net_fees_in_gbp
) as xero_basic_screening_net_fees_in_gbp,
sum(xero_booking_net_fees_in_gbp) as xero_booking_net_fees_in_gbp,
sum(
xero_old_dashboard_booking_net_fees_in_gbp
) as xero_old_dashboard_booking_net_fees_in_gbp,
sum(xero_listing_net_fees_in_gbp) as xero_listing_net_fees_in_gbp,
sum(xero_verification_net_fees_in_gbp) as xero_verification_net_fees_in_gbp,
sum(xero_operator_net_fees_in_gbp) as xero_operator_net_fees_in_gbp,

View file

@ -33,7 +33,9 @@
sum(
xero_basic_screening_net_fees_in_gbp
) as xero_basic_screening_net_fees_in_gbp,
sum(xero_booking_net_fees_in_gbp) as xero_booking_net_fees_in_gbp,
sum(
xero_old_dashboard_booking_net_fees_in_gbp
) as xero_old_dashboard_booking_net_fees_in_gbp,
sum(xero_listing_net_fees_in_gbp) as xero_listing_net_fees_in_gbp,
sum(xero_verification_net_fees_in_gbp) as xero_verification_net_fees_in_gbp,
sum(xero_operator_net_fees_in_gbp) as xero_operator_net_fees_in_gbp,

View file

@ -96,11 +96,11 @@ select
) as xero_basic_screening_net_fees_in_gbp,
sum(
case
when ixsdm.accounting_root_aggregation = 'Booking Fees'
when ixsdm.accounting_root_aggregation = 'Old Dashboard Booking Fees'
then ixsdm.line_amount_wo_taxes_in_gbp
else 0
end
) as xero_booking_net_fees_in_gbp,
) as xero_old_dashboard_booking_net_fees_in_gbp,
sum(
case
when ixsdm.accounting_root_aggregation = 'Listing Fees'

View file

@ -38,7 +38,9 @@ select
sum(
ir.xero_basic_screening_net_fees_in_gbp
) as xero_basic_screening_net_fees_in_gbp,
sum(ir.xero_booking_net_fees_in_gbp) as xero_booking_net_fees_in_gbp,
sum(
ir.xero_old_dashboard_booking_net_fees_in_gbp
) as xero_old_dashboard_booking_net_fees_in_gbp,
sum(ir.xero_listing_net_fees_in_gbp) as xero_listing_net_fees_in_gbp,
sum(ir.xero_verification_net_fees_in_gbp) as xero_verification_net_fees_in_gbp,
sum(ir.xero_operator_net_fees_in_gbp) as xero_operator_net_fees_in_gbp,

View file

@ -38,7 +38,9 @@ select
sum(
ir.xero_basic_screening_net_fees_in_gbp
) as xero_basic_screening_net_fees_in_gbp,
sum(ir.xero_booking_net_fees_in_gbp) as xero_booking_net_fees_in_gbp,
sum(
ir.xero_old_dashboard_booking_net_fees_in_gbp
) as xero_old_dashboard_booking_net_fees_in_gbp,
sum(ir.xero_listing_net_fees_in_gbp) as xero_listing_net_fees_in_gbp,
sum(ir.xero_verification_net_fees_in_gbp) as xero_verification_net_fees_in_gbp,
sum(ir.xero_operator_net_fees_in_gbp) as xero_operator_net_fees_in_gbp,

View file

@ -4401,10 +4401,10 @@ models:
in a given date and per specified dimension. This is a New
Dashboard service.
- name: xero_booking_net_fees_in_gbp
- name: xero_old_dashboard_booking_net_fees_in_gbp
data_type: decimal
description: |
Sum of daily Booking Net Fees, in GBP, without taxes
Sum of daily Old Dashboard Booking Net Fees, in GBP, without taxes
in a given date and per specified dimension.
- name: xero_listing_net_fees_in_gbp
@ -4603,10 +4603,10 @@ models:
in a given month and per specified dimension. This is a New
Dashboard service.
- name: xero_booking_net_fees_in_gbp
- name: xero_old_dashboard_booking_net_fees_in_gbp
data_type: decimal
description: |
Sum of accumulated Booking Net Fees, in GBP, without taxes
Sum of accumulated Old Dashboard Booking Net Fees, in GBP, without taxes
in a given month and per specified dimension.
- name: xero_listing_net_fees_in_gbp
@ -4798,10 +4798,10 @@ models:
in a given month up to the given date and per specified dimension.
This is a New Dashboard service.
- name: xero_booking_net_fees_in_gbp
- name: xero_old_dashboard_booking_net_fees_in_gbp
data_type: decimal
description: |
Sum of accumulated Booking Net Fees, in GBP, without taxes
Sum of accumulated Old Dashboard Booking Net Fees, in GBP, without taxes
in a given month up to the given date and per specified dimension.
- name: xero_listing_net_fees_in_gbp
@ -4904,7 +4904,7 @@ models:
- xero_sex_offenders_check_net_fees_in_gbp
- xero_protection_pro_net_fees_in_gbp
- xero_basic_screening_net_fees_in_gbp
- xero_booking_net_fees_in_gbp
- xero_old_dashboard_booking_net_fees_in_gbp
- xero_listing_net_fees_in_gbp
- xero_verification_net_fees_in_gbp
- xero_operator_net_fees_in_gbp
@ -4978,10 +4978,10 @@ models:
for a given date, dimension and value.
This is a New Dashboard service.
- name: xero_booking_net_fees_in_gbp
- name: xero_old_dashboard_booking_net_fees_in_gbp
data_type: decimal
description: |
The monthly Booking Net Fees, in GBP, without taxes
The monthly Old Dashboard Booking Net Fees, in GBP, without taxes
for a given date, dimension and value.
- name: xero_listing_net_fees_in_gbp
@ -5081,7 +5081,7 @@ models:
- xero_sex_offenders_check_net_fees_in_gbp
- xero_protection_pro_net_fees_in_gbp
- xero_basic_screening_net_fees_in_gbp
- xero_booking_net_fees_in_gbp
- xero_old_dashboard_booking_net_fees_in_gbp
- xero_listing_net_fees_in_gbp
- xero_verification_net_fees_in_gbp
- xero_operator_net_fees_in_gbp
@ -5156,10 +5156,10 @@ models:
for a given date, dimension and value.
This is a New Dashboard service.
- name: xero_booking_net_fees_in_gbp
- name: xero_old_dashboard_booking_net_fees_in_gbp
data_type: decimal
description: |
The month-to-date Booking Net Fees, in GBP, without taxes
The month-to-date Old Dashboard Booking Net Fees, in GBP, without taxes
for a given date, dimension and value.
- name: xero_listing_net_fees_in_gbp

View file

@ -95,7 +95,15 @@ select
end as host_resolution_payment_per_created_booking_ratio,
case
when {{ is_date_before_20th_of_previous_month("date") }}
then xero_booking_net_fees_in_gbp
then xero_old_dashboard_booking_net_fees_in_gbp
else null
end as xero_old_dashboard_booking_net_fees_in_gbp,
-- Following line is a temporary handler to not break reporting.
-- We will need this line anyway for the combination of Old and New
-- Dash.
case
when {{ is_date_before_20th_of_previous_month("date") }}
then xero_old_dashboard_booking_net_fees_in_gbp
else null
end as xero_booking_net_fees_in_gbp,
case