This PR closes the first draft of the first batch of business kpis. Host logic has changed to be applied at deal id level. It's mostly an adapted copy-paste from the accommodation counterpart, specifically: - `int_core__mtd_deal_lifecycle`: computes the historic deal lifecycle. One line for each deal and MTD date. **Important**: _Not all hosts have a deal set. This will need a data quality report for business teams to fix_ - `int_core__mtd_deal_metrics`: computes the aggregation at MTD date level of the metrics per lifecycle state and activity state Additionally, this PR changes: - `int_core__mtd_aggregated_metrics`: it includes the new 3 deal metrics and changes the source of the already existing 3 deal metrics from `mtd_booking_metrics` to the new `mtd_deal_metrics` - `int_core__mtd_booking_metrics`: removes all code needed to compute the remaining deal metrics, speeding it up considerably. After this PR, the mtd models run (locally) at the following speed: - `int_core__mtd_accommodation_lifecycle`: 47 sec - `int_core__mtd_deal_lifecycle`: 3 sec - `int_core__mtd_accommodation_metrics`: 5 sec - `int_core__mtd_deal_metrics`: < 1 sec - `int_core__mtd_booking_metrics`: 8 sec (quite a reduction) - `int_core__mtd_guest_journey_metrics`: 5 sec - `int_core__mtd_aggregated_metrics` and `core__mtd_aggregated_metrics`: < 1 sec Related work items: #17312 |
||
|---|---|---|
| .. | ||
| intermediate | ||
| reporting | ||
| staging | ||
| doc_blocks.md | ||