data-dwh-dbt-project/models/intermediate/kpis
Oriol Roqué Paniagua 5382a9b32b Merged PR 4374: Ensures KYG lite users are excluded from New and Old Dash
# Description

Changes:
* **Main change:** exclusion of KYG lite users of the segmentation of Business Scope. These are "freemium" users, kind of demo users, that shouldn't have any real impact in terms of revenue. These are in New Dash, but do not have a deal. The problem is that we don't want to consider them as New Dash, but the current condition was making them appear as Old Dash. This PR fixes this by handling the logic for backend related models. Note that Xero remains unaffected - this is based on Deal, and these users do not have Deal.
* Small data quality fix I noticed while debugging KYG lite cases. It's better to use the "is upgraded service" from the staging original tables rather than the one with the prices. If a user does not have a currency (which can be the case for KYG lite users), then the coalesce would tag any service as not upgraded, which is not true.

# 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: #27356
2025-02-13 09:38:43 +00:00
..
_kpis_readme.md Merged PR 3329: First version of KPIs refactored - created bookings 2024-10-30 08:55:19 +00:00
int_kpis__agg_daily_deals.sql Cleaned first time booked for deals 2025-01-30 10:16:29 +01:00
int_kpis__agg_daily_listings.sql Merged PR 3461: Creates models for listing metrics 2024-11-07 16:56:43 +00:00
int_kpis__agg_daily_new_dash_chargeable_services.sql Merged PR 3676: Hotfix - Chargeable Services - Daily Agg 2024-11-26 16:52:48 +00:00
int_kpis__agg_daily_new_dash_created_services.sql Merged PR 3654: New Dash KPIs - Chargeable Services (Revenue) 2024-11-26 10:14:37 +00:00
int_kpis__agg_dates_main_kpis.sql Merged PR 3914: Include Hubspot deals for KPIs 2024-12-31 15:12:38 +00:00
int_kpis__agg_monthly_billable_bookings.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_monthly_check_out_bookings.sql Merged PR 4303: Adds Cancelled and Not Cancelled Check-out Bookings 2025-02-06 12:01:24 +00:00
int_kpis__agg_monthly_completed_guest_journeys.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_monthly_created_bookings.sql Merged PR 4304: Adds Cancelled and Not Cancelled Created Bookings 2025-02-06 13:13:02 +00:00
int_kpis__agg_monthly_created_guest_journeys.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_monthly_guest_journeys_with_payment.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_monthly_guest_payments.sql renamed test entity 2024-11-07 12:56:49 +01:00
int_kpis__agg_monthly_host_resolutions.sql Merged PR 3419: Adds Host Resolutions metrics in new KPIs 2024-11-05 07:45:41 +00:00
int_kpis__agg_monthly_invoiced_revenue.sql Merged PR 4104: Refactor Invoiced Revenue from Account Code + New Revenue Streams 2025-01-20 14:18:05 +00:00
int_kpis__agg_monthly_new_dash_chargeable_services.sql Merged PR 3667: Creates Chargeable metrics for New Dash KPIs 2024-11-26 14:19:41 +00:00
int_kpis__agg_monthly_new_dash_created_services.sql Merged PR 3599: New Dash KPIs skeleton with Created Services 2024-11-20 09:43:30 +00:00
int_kpis__agg_monthly_started_guest_journeys.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_mtd_billable_bookings.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_mtd_check_out_bookings.sql Merged PR 4303: Adds Cancelled and Not Cancelled Check-out Bookings 2025-02-06 12:01:24 +00:00
int_kpis__agg_mtd_completed_guest_journeys.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_mtd_created_bookings.sql Merged PR 4304: Adds Cancelled and Not Cancelled Created Bookings 2025-02-06 13:13:02 +00:00
int_kpis__agg_mtd_created_guest_journeys.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_mtd_guest_journeys_with_payment.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_mtd_guest_payments.sql renamed test entity 2024-11-07 12:56:49 +01:00
int_kpis__agg_mtd_host_resolutions.sql Merged PR 3419: Adds Host Resolutions metrics in new KPIs 2024-11-05 07:45:41 +00:00
int_kpis__agg_mtd_invoiced_revenue.sql Merged PR 4104: Refactor Invoiced Revenue from Account Code + New Revenue Streams 2025-01-20 14:18:05 +00:00
int_kpis__agg_mtd_started_guest_journeys.sql aggregated to agg 2024-11-05 12:17:26 +01:00
int_kpis__agg_weekly_new_dash_chargeable_services.sql Merged PR 3667: Creates Chargeable metrics for New Dash KPIs 2024-11-26 14:19:41 +00:00
int_kpis__agg_weekly_new_dash_created_services.sql Merged PR 3616: Compute weekly new dash created services 2024-11-21 11:30:36 +00:00
int_kpis__dimension_daily_accommodation.sql Merged PR 3329: First version of KPIs refactored - created bookings 2024-10-30 08:55:19 +00:00
int_kpis__dimension_date_product_guest.sql Merged PR 4124: Adds dedicated start date for KPIs 2025-01-21 11:18:16 +00:00
int_kpis__dimension_dates.sql Merged PR 4124: Adds dedicated start date for KPIs 2025-01-21 11:18:16 +00:00
int_kpis__dimension_deals.sql Merged PR 4349: Xero metrics by Business Scope 2025-02-11 15:13:42 +00:00
int_kpis__lifecycle_daily_accommodation.sql Merged PR 3433: Change lifecycle daily to just handle last available day 2024-11-06 11:10:31 +00:00
int_kpis__lifecycle_daily_deal.sql Addressed comments 2025-01-29 17:06:37 +01:00
int_kpis__metric_daily_billable_bookings.sql Merged PR 3391: Adds Check-Out, Cancelled and Billable Bookings 2024-10-31 14:31:19 +00:00
int_kpis__metric_daily_check_in_attributed_guest_journeys.sql Changed to updated_at_utc 2024-11-19 09:23:28 +01:00
int_kpis__metric_daily_check_out_bookings.sql Merged PR 4374: Ensures KYG lite users are excluded from New and Old Dash 2025-02-13 09:38:43 +00:00
int_kpis__metric_daily_completed_guest_journeys.sql Merged PR 4374: Ensures KYG lite users are excluded from New and Old Dash 2025-02-13 09:38:43 +00:00
int_kpis__metric_daily_created_bookings.sql Merged PR 4374: Ensures KYG lite users are excluded from New and Old Dash 2025-02-13 09:38:43 +00:00
int_kpis__metric_daily_created_guest_journeys.sql Merged PR 4374: Ensures KYG lite users are excluded from New and Old Dash 2025-02-13 09:38:43 +00:00
int_kpis__metric_daily_deals.sql Cleaned first time booked for deals 2025-01-30 10:16:29 +01:00
int_kpis__metric_daily_guest_journeys_with_payment.sql Merged PR 4374: Ensures KYG lite users are excluded from New and Old Dash 2025-02-13 09:38:43 +00:00
int_kpis__metric_daily_guest_payments.sql Merged PR 4374: Ensures KYG lite users are excluded from New and Old Dash 2025-02-13 09:38:43 +00:00
int_kpis__metric_daily_host_resolutions.sql Merged PR 4349: Xero metrics by Business Scope 2025-02-11 15:13:42 +00:00
int_kpis__metric_daily_invoiced_revenue.sql Merged PR 4349: Xero metrics by Business Scope 2025-02-11 15:13:42 +00:00
int_kpis__metric_daily_listings.sql Merged PR 3461: Creates models for listing metrics 2024-11-07 16:56:43 +00:00
int_kpis__metric_daily_new_dash_chargeable_services.sql Updated all PK in created and chargeable services models 2024-12-02 12:42:47 +01:00
int_kpis__metric_daily_new_dash_created_services.sql Updated all PK in created and chargeable services models 2024-12-02 12:42:47 +01:00
int_kpis__metric_daily_started_guest_journeys.sql Merged PR 4374: Ensures KYG lite users are excluded from New and Old Dash 2025-02-13 09:38:43 +00:00
int_kpis__metric_monthly_billable_bookings.sql Merged PR 3391: Adds Check-Out, Cancelled and Billable Bookings 2024-10-31 14:31:19 +00:00
int_kpis__metric_monthly_check_out_bookings.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_monthly_completed_guest_journeys.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_monthly_created_bookings.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_monthly_created_guest_journeys.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_monthly_guest_journeys_with_payment.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_monthly_guest_payments.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_monthly_host_resolutions.sql Merged PR 4357: Propagates in Host Resolutions and Invoiced Revenue the new business scope 2025-02-12 08:17:44 +00:00
int_kpis__metric_monthly_invoiced_revenue.sql Merged PR 4357: Propagates in Host Resolutions and Invoiced Revenue the new business scope 2025-02-12 08:17:44 +00:00
int_kpis__metric_monthly_new_dash_chargeable_services.sql Updated all PK in created and chargeable services models 2024-12-02 12:42:47 +01:00
int_kpis__metric_monthly_new_dash_created_services.sql Updated all PK in created and chargeable services models 2024-12-02 12:42:47 +01:00
int_kpis__metric_monthly_started_guest_journeys.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_mtd_billable_bookings.sql Merged PR 3391: Adds Check-Out, Cancelled and Billable Bookings 2024-10-31 14:31:19 +00:00
int_kpis__metric_mtd_check_out_bookings.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_mtd_completed_guest_journeys.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_mtd_created_bookings.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_mtd_created_guest_journeys.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_mtd_guest_journeys_with_payment.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_mtd_guest_payments.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_mtd_host_resolutions.sql Merged PR 4357: Propagates in Host Resolutions and Invoiced Revenue the new business scope 2025-02-12 08:17:44 +00:00
int_kpis__metric_mtd_invoiced_revenue.sql Merged PR 4357: Propagates in Host Resolutions and Invoiced Revenue the new business scope 2025-02-12 08:17:44 +00:00
int_kpis__metric_mtd_started_guest_journeys.sql Merged PR 4352: Bulk update dash_source to business_scope 2025-02-11 16:19:33 +00:00
int_kpis__metric_weekly_new_dash_chargeable_services.sql Updated all PK in created and chargeable services models 2024-12-02 12:42:47 +01:00
int_kpis__metric_weekly_new_dash_created_services.sql Updated all PK in created and chargeable services models 2024-12-02 12:42:47 +01:00
int_kpis__product_guest_agg_metrics.sql Modified mtd filter 2024-11-27 09:52:05 +01:00
int_kpis__product_guest_daily_metrics.sql fixed model copy paste 2024-11-26 12:36:54 +01:00
int_kpis__product_new_dash_agg_metrics.sql Merged PR 3667: Creates Chargeable metrics for New Dash KPIs 2024-11-26 14:19:41 +00:00
schema.yml Merged PR 4357: Propagates in Host Resolutions and Invoiced Revenue the new business scope 2025-02-12 08:17:44 +00:00