data-dwh-dbt-project/models/intermediate/cross
Oriol Roqué Paniagua ca5db795a3 Merged PR 4946: Allows By Deal dimension to be propagated within intermediate
# Description

To be able to compute By Deal KPIs  similarly as we do for Main KPIs we need to propagate the "By Deal" dimension first in intermediate. This does not impact reporting since there's a macro that already cuts the dimensions to be displayed, but I modified the name so it's clearer.

Changes:
* In `int_mtd_vs_previous_year_metrics`, I added a new `dimension_list`. This is applied to all initial CTEs that filter by dimension. Note that I added here the `by_deal` dimension.
* Modified the name of `get_kpi_dimensions_for_production` to `get_main_kpis_dimensions_for_production`. Now it's more explicit that this is the configuration for Main KPIs reporting. This affects both `business_kpis_configuration` and it's usage in `mtd_aggregated_metrics`.
* Modified the tests in `int_mtd_vs_previous_year_metrics` and `int_mtd_aggregated_metrics` to include the new dimension `by_deal`.
* It seems by adding this now autoformatting works again on this model! I'll tag all cases that are just because of autoformatting.

MD5 trick has been applied in `reporting.mtd_aggregated_metrics`.

# 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: #28998
2025-04-08 05:37:53 +00:00
..
int_daily_currency_exchange_rates.sql go back to var, made a mistake in the last commit 2024-06-17 11:32:20 +02:00
int_dates.sql start cross folder in int to stop piling models at int root 2024-06-14 16:26:18 +02:00
int_deals_consolidation.sql ordered names to select oldest one created 2025-01-07 11:47:14 +01:00
int_edeposit_and_athena_verifications.sql Update athena models to remove id_accommodation 2025-02-24 15:21:44 +01:00
int_monthly_aggregated_metrics_history_by_deal.sql Merged PR 4887: Adds audit helper + finishes KPIs Refactor Stage 1 2025-04-02 14:03:33 +00:00
int_monthly_aggregated_metrics_history_by_deal_by_time_window.sql Merged PR 4907: KPIs Refactor Stage 2 - Decouple AM - Churn/Account Margin 2025-04-03 13:00:04 +00:00
int_monthly_growth_score_by_deal.sql Refactor growth score by deal to stop depending on cross models 2025-04-02 16:57:19 +02:00
int_mtd_aggregated_metrics.sql Merged PR 4769: Refactors display exclusion in main metrics 2025-03-21 09:40:20 +00:00
int_mtd_vs_previous_year_metrics.sql Merged PR 4946: Allows By Deal dimension to be propagated within intermediate 2025-04-08 05:37:53 +00:00
int_simple_exchange_rates.sql simple model 2024-06-14 16:44:40 +02:00
int_ytd_mtd_aggregated_main_metrics_overview.sql Merged PR 4882: Fix Business Targets 2025-04-02 07:32:11 +00:00
int_ytd_mtd_main_metrics_overview.sql Merged PR 4759: Adds Booking Fee per Billable Booking 2025-03-20 16:01:27 +00:00
schema.yml Merged PR 4946: Allows By Deal dimension to be propagated within intermediate 2025-04-08 05:37:53 +00:00