data-dwh-dbt-project/macros
Oriol Roqué Paniagua 42d70f72d5 Merged PR 3667: Creates Chargeable metrics for New Dash KPIs
# Description

Creates the models for KPIs for New Dash - Chargeable metrics. In essence, computes 4 metrics:
- Chargeable Services
- Chargeable Amount (in GBP)
- Chargeable Bookings (unique over a time period and dimension, not additive)
- Chargeable Listings (unique over a time period and dimension, not additive)

This is done by creating:
- A Weekly Metric and Monthly Metric model. Here we keep the granularity of id_booking / id_accommodation to be able to compute the uniqueness.
- A Daily, Weekly and Monthly Aggregated models. Same as usual.
- Integrates everything to the existing model for Product New Dash Agg Metrics
- Exposes everything into reporting

NB: I removed on "by_host" in Created Services - I forgot to clear it out.

# 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: #20809
2024-11-26 14:19:41 +00:00
..
tests Modified name and changed date to group as an argument 2024-11-26 10:33:03 +01:00
.gitkeep start project 2024-01-18 11:24:35 +01:00
business_kpis_configuration.sql Merged PR 3667: Creates Chargeable metrics for New Dash KPIs 2024-11-26 14:19:41 +00:00
calculate_safe_relative_increment.sql Merged PR 2232: KPI refactor - 1st step, bookings 2024-07-08 15:58:36 +00:00
cosmos_db_utils.sql DRY on stg cosmos db models 2024-09-19 15:17:33 +02:00
generate_schema_name.sql macros docs 2024-05-22 11:42:42 +02:00
generate_stripe_sources_unioned_select.sql Create macro and use it in balance transactions 2024-03-05 13:33:13 +01:00
is_date_before_previous_month.sql Merged PR 2257: Expose guest revenue and guest journey payment metrics 2024-07-10 14:17:05 +00:00
unix_ms_timestamp_to_utc.sql add table alias optional argument to macro 2024-10-14 11:37:37 +02:00