Merged PR 4977: More robust testing on key metrics

# Description

Adds more robust testing for Total Revenue and Revenue Retained Post-Resolutions in:
* int_mtd_vs_previous_year_metrics
* int_ytd_mtd_main_metrics_overview

# 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.
- [ ] I have checked for DRY opportunities with other models and docs.
- [ ] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

More robust testing on key metrics

Related work items: #29227
This commit is contained in:
Oriol Roqué Paniagua 2025-04-10 13:06:04 +00:00
parent b48212fa33
commit 587661f818

View file

@ -152,6 +152,13 @@ models:
- dimension - dimension
- dimension_value - dimension_value
- dbt_expectations.expect_column_pair_values_to_be_equal:
column_A: revenue_retained_post_resolutions_in_gbp
column_B: total_revenue_in_gbp + xero_waiver_paid_back_to_host_in_gbp + xero_host_resolution_amount_paid_in_gbp
- dbt_expectations.expect_column_pair_values_to_be_equal:
column_A: total_revenue_in_gbp
column_B: total_guest_payments_in_gbp + xero_apis_net_fees_in_gbp + xero_operator_net_fees_in_gbp
columns: columns:
- name: date - name: date
data_type: date data_type: date
@ -1732,6 +1739,19 @@ models:
- dimension - dimension
- dimension_value - dimension_value
- dbt_expectations.expect_column_pair_values_to_be_equal:
column_A: current_month_mtd_revenue_retained_post_resolutions_in_gbp
column_B: current_month_mtd_total_revenue_in_gbp + current_month_mtd_xero_waiver_paid_back_to_host_in_gbp + current_month_mtd_xero_host_resolution_amount_paid_in_gbp
- dbt_expectations.expect_column_pair_values_to_be_equal:
column_A: current_ytd_revenue_retained_post_resolutions_in_gbp
column_B: current_ytd_total_revenue_in_gbp + current_ytd_xero_waiver_paid_back_to_host_in_gbp + current_ytd_xero_host_resolution_amount_paid_in_gbp
- dbt_expectations.expect_column_pair_values_to_be_equal:
column_A: current_month_mtd_total_revenue_in_gbp
column_B: current_month_mtd_total_guest_payments_in_gbp + current_month_mtd_xero_apis_net_fees_in_gbp + current_month_mtd_xero_operator_net_fees_in_gbp
- dbt_expectations.expect_column_pair_values_to_be_equal:
column_A: current_ytd_total_revenue_in_gbp
column_B: current_ytd_total_guest_payments_in_gbp + current_ytd_xero_apis_net_fees_in_gbp + current_ytd_xero_operator_net_fees_in_gbp
columns: columns:
- name: date - name: date
data_type: date data_type: date