data-dwh-dbt-project/models/intermediate/core
Oriol Roqué Paniagua 3b75d9eefb Merged PR 2257: Expose guest revenue and guest journey payment metrics
This PR aims to expose the new metrics to the business KPIs report.
The new metrics exposed are, for the global and the by deal view:
- Guest Revenue
- Guest Revenue per Guest Journey Completed
- Guest Revenue per Guest Journey with Payment
- Guest Payments
- Guest Payments per Guest Journey Completed
- Guest Payments per Guest Journey with Payment
- Guest Journey with Payment
- Guest Journey Payment Rate

Changes:
- Silly change on the naming in the by deal view of `payment_rate_guest_journey` to be consistent with the global view.
- Silly change that I miss some GJ payment metric for the view by deal id.
- Added a new number format called `currency_gbp` - only for monetary metrics, available in the schema files
- Usual procedure to publish metrics: for global metrics, add them in the `int_mtd_aggregated_metrics`. I also changed the order of display.
- **Important**: to avoid displaying revenue figures until Xero invoicing is handled, I created a macro called `is_date_before_previous_month` that is called in the reporting equivalent models: `mtd_aggregated_metrics` in the where section and in the `monthly_aggregated_metrics_history_by_deal` as a case-when.

This should allow to expose all new metrics, and enable the publishing of a new update of the business kpis!

Related work items: #18107
2024-07-10 14:17:05 +00:00
..
int_core__accommodation.sql Merged PR 2125: Fixing accommodation host 2024-06-26 14:47:15 +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__check_in_cover_users.sql Merged PR 2201: Fixing errors raised by texts 2024-07-05 15:12:04 +00: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__guest_satisfaction_responses.sql Fixed join on model taking id_verification instead of id_verification_request 2024-07-05 17:24:06 +02:00
int_core__monthly_accommodation_history_by_deal.sql Merged PR 2172: Adding accommodation metrics by deal id 2024-07-02 09:32:52 +00:00
int_core__monthly_booking_history_by_deal.sql Merged PR 2164: Adding booking metrics by deal id for business kpis 2024-07-01 16:00:14 +00:00
int_core__monthly_guest_journey_history_by_deal.sql Merged PR 2257: Expose guest revenue and guest journey payment metrics 2024-07-10 14:17:05 +00:00
int_core__mtd_accommodation_lifecycle.sql Merged PR 2125: Fixing accommodation host 2024-06-26 14:47:15 +00:00
int_core__mtd_accommodation_metrics.sql Merged PR 2236: Refactor of already exposed metrics: listings, deals and guest journeys 2024-07-09 13:00:43 +00:00
int_core__mtd_booking_metrics.sql Merged PR 2232: KPI refactor - 1st step, bookings 2024-07-08 15:58:36 +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 2236: Refactor of already exposed metrics: listings, deals and guest journeys 2024-07-09 13:00:43 +00:00
int_core__mtd_guest_journey_metrics.sql Merged PR 2236: Refactor of already exposed metrics: listings, deals and guest journeys 2024-07-09 13:00:43 +00: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__unique_accommodation_to_user.sql Merged PR 2125: Fixing accommodation host 2024-06-26 14:47:15 +00: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 2246: KPIs refactor: naming convention and PBI sources replication 2024-07-09 15:14:50 +00:00