data-dwh-dbt-project/models/intermediate
Oriol Roqué Paniagua 412e242f42 Merged PR 5586: Fix duplications on 1st of Month for Billable Items Growth Score
# Description

This relates to today's data alerts on Growth Score models.

Error has been found in `int_billable_items_growth_score_by_deal`. This only happens on the 1st of the month.

On the 1st day of the month we will have:
* The actual monthly data from KPIs in the previous month.

But also:
* Projected KPIs will still display data for the previous month, in this case though, projected = actuals.

There's a union all that combines actual monthly KPI data for history purposes and the projected data which fails in this case.

Fix is to remove the data from Projected KPIs if the current date of execution (1st of July) equals the first day of the month when computing `end_date` + 1 day. End date being at this moment 30th of June, + 1 day = 1st of July, extracting the first day of the month then 1st July.

# 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.
- [NA] I have checked for DRY opportunities with other models and docs.
- [NA] 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: #31665
2025-07-01 08:38:21 +00:00
..
athena Merged PR 5047: First API unified version of Verifications 2025-04-24 12:21:50 +00:00
check_in_hero adding id_deal to api models 2025-03-19 09:23:23 +01:00
core new a/b test model in reporting and updated exposure 2025-07-01 09:59:36 +02:00
cross Merged PR 5586: Fix duplications on 1st of Month for Billable Items Growth Score 2025-07-01 08:38:21 +00:00
edeposit Addressed comments 2025-03-19 12:06:05 +01:00
hubspot Merged PR 5256: Reporting version of New Dash Onboarding 2025-05-19 15:41:48 +00:00
kpis Add Flex API into KPI models 2025-06-11 14:44:07 +02:00
resolutions Removed not_null tests 2025-06-19 11:58:37 +02:00
screen_and_protect adding id_deal to api models 2025-03-19 09:23:23 +01:00
xero silly me 2025-06-12 12:07:16 +02:00