Merged PR 5001: Payouts amounts attributed to Bookings

# Description

Adds monetary value in terms of payouts for further understanding of the potential impact on improving the flagging.

# 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: #29284
This commit is contained in:
Oriol Roqué Paniagua 2025-04-16 06:48:39 +00:00
parent e981cc1739
commit 4922fce426
2 changed files with 81 additions and 3 deletions

View file

@ -2868,6 +2868,12 @@ models:
- dbt_expectations.expect_column_pair_values_to_be_equal:
column_A: completed_not_awaiting_resolution_bookings
column_B: completed_risk_with_submitted_payout_bookings + completed_no_risk_without_submitted_payout_bookings + completed_risk_without_submitted_payout_bookings + completed_no_risk_with_submitted_payout_bookings
- dbt_expectations.expect_column_pair_values_to_be_equal:
column_A: total_amount_paid_in_gbp
column_B: completed_amount_paid_in_gbp + not_completed_amount_paid_in_gbp
- dbt_expectations.expect_column_pair_values_to_be_equal:
column_A: completed_amount_paid_in_gbp
column_B: completed_risk_with_submitted_payout_amount_paid_in_gbp + completed_no_risk_with_submitted_payout_amount_paid_in_gbp
columns:
- name: total_bookings
@ -3018,6 +3024,38 @@ models:
For the submitted payout-based performance analysis, this would be
the false negative.
- name: total_amount_paid_in_gbp
data_type: numeric
description: |
Total amount paid in GBP in terms of Resolutions Payouts for all
Bookings.
- name: completed_amount_paid_in_gbp
data_type: numeric
description: |
Total amount paid in GBP in terms of Resolutions Payouts for Completed
Bookings.
- name: not_completed_amount_paid_in_gbp
data_type: numeric
description: |
Total amount paid in GBP in terms of Resolutions Payouts for
Bookings that are not completed, for reference.
- name: completed_risk_with_submitted_payout_amount_paid_in_gbp
data_type: numeric
description: |
Total amount paid in GBP in terms of Resolutions Payouts for Completed
Bookings that have been flagged as at Risk AND that have had a
submitted payout, with the claim being in a finished status.
- name: completed_no_risk_with_submitted_payout_amount_paid_in_gbp
data_type: numeric
description: |
Total amount paid in GBP in terms of Resolutions Payouts for Completed
Bookings that have NOT been flagged as at Risk AND that have had a
submitted payout, with the claim being in a finished status.
- name: int_flagging_performance_analysis
description: |
Provides a basic statistical analysis with binary classification metrics