data-dwh-dbt-project/models/intermediate
Oriol Roqué Paniagua a2cad661dd Merged PR 4996: First tracking of flagging performance
# Description

Creates 2 new models in the scope of flagging: how good are we at identifying "at risk" bookings vs. 1) the number of claims generated and 2) the number of submitted payouts?
This only applies for Protected Bookings in New Dash that have been completed (14 days after the check-out) with potential resolutions appearing in Resolutions Center.

The first table `int_flagging_booking_categorisation` contains all the heavy logic to categorise the bookings.

The second view `int_flagging_performance_analysis` computes standard binary classification scores, for the 2 possible ways of tracking.

Tables are already in prod to help you understand while reviewing. You'll see that the figures are still quite low, specially due to small amount of claims/submitted payouts. This makes the true positives being just... 1.

There's heavy test and documentation coverage to ensure there's no mistakes on the computation.

# 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. **Materialising as table the first model despite being just 1 record since otherwise tests takes ages**

# Other

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

Related work items: #29284
2025-04-15 10:14:02 +00:00
..
athena Update athena models to remove id_accommodation 2025-02-24 15:21:44 +01:00
check_in_hero adding id_deal to api models 2025-03-19 09:23:23 +01:00
core upgraded screening 2025-04-08 12:09:08 +02:00
cross Merged PR 4996: First tracking of flagging performance 2025-04-15 10:14:02 +00:00
edeposit Addressed comments 2025-03-19 12:06:05 +01:00
hubspot Merged PR 4918: Adds Integration Type from Hubspot Deals 2025-04-04 08:40:38 +00:00
kpis Merged PR 4970: Fix data quality issue on Revenue Retained metrics 2025-04-10 07:23:31 +00:00
resolutions Calculator changes 2025-02-28 12:19:24 +01:00
screen_and_protect adding id_deal to api models 2025-03-19 09:23:23 +01:00
xero Merged PR 4734: Bugfix - Ensures accounts cannot be duplicated in Xero sales monthly trends 2025-03-19 08:19:20 +00:00