data-dwh-dbt-project/models/intermediate/core
Oriol Roqué Paniagua 6c053a0753 Merged PR 2107: Adds host lifecycle metrics into biz kpis
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
2024-06-25 12:20:59 +00:00
..
int_core__accommodation.sql Merged PR 2094: Removing lifecycle logic from int_core__accommodation 2024-06-21 14:13:42 +00:00
int_core__booking_charge_events.sql Merged PR 2029: Guest Journey - start date based on used link 2024-06-13 14:53:58 +00:00
int_core__bookings.sql a few quick and dirty improvements 2024-05-10 00:31:27 +02:00
int_core__check_in_cover_prices.sql propagating renames 2024-05-08 12:03:44 +02:00
int_core__country.sql Merged PR 2077: Adding Country to intermediate 2024-06-19 15:34:15 +00:00
int_core__deal_id_master_list.sql docs and moving stuff 2024-04-08 09:44:32 +02:00
int_core__duplicate_bookings.sql a few quick and dirty improvements 2024-05-10 00:31:27 +02:00
int_core__mtd_accommodation_lifecycle.sql Merged PR 2090: Adding int_core__mtd_accommodation_lifecycle 2024-06-21 13:59:14 +00:00
int_core__mtd_accommodation_metrics.sql Merged PR 2107: Adds host lifecycle metrics into biz kpis 2024-06-25 12:20:59 +00:00
int_core__mtd_aggregated_metrics.sql Merged PR 2107: Adds host lifecycle metrics into biz kpis 2024-06-25 12:20:59 +00:00
int_core__mtd_booking_metrics.sql Merged PR 2107: Adds host lifecycle metrics into biz kpis 2024-06-25 12:20:59 +00:00
int_core__mtd_deal_lifecycle.sql Merged PR 2107: Adds host lifecycle metrics into biz kpis 2024-06-25 12:20:59 +00:00
int_core__mtd_deal_metrics.sql Merged PR 2107: Adds host lifecycle metrics into biz kpis 2024-06-25 12:20:59 +00:00
int_core__mtd_guest_journey_metrics.sql Adding guest journey KPIs. Updating gitignore 2024-06-17 11:10:13 +02:00
int_core__price_plans.sql docs and moving stuff 2024-04-08 09:44:32 +02:00
int_core__unified_user.sql add phone number 2024-06-10 16:14:07 +02:00
int_core__verification_payments.sql remove old table from cte 2024-06-18 11:31:59 +02:00
int_core__verification_request_completed_date.sql Merged PR 2028: guest journey estimated completed date 2024-06-13 13:30:22 +00:00
int_core__verification_request_completeness.sql Merged PR 2020: Verification request completeness for intermediate steps + schema documentation 2024-06-13 08:14:11 +00:00
int_core__verification_requests.sql Merged PR 2029: Guest Journey - start date based on used link 2024-06-13 14:53:58 +00:00
int_core__vr_check_in_cover.sql Merged PR 2029: Guest Journey - start date based on used link 2024-06-13 14:53:58 +00:00
schema.yaml Merged PR 2107: Adds host lifecycle metrics into biz kpis 2024-06-25 12:20:59 +00:00