data-dwh-dbt-project/models
Oriol Roqué Paniagua f292bc84ba Merged PR 3059: Keep latest booking to product bundle program
# Description

This PR fixes today's issue on dbt test, since we had a duplicated booking in this table.

Technically, according to Daga, a booking can only be overridden with a new program ONLY if the first program was the default BasicScreening, and it's a new bundle containing a Paid Service. Once there's a product bundle applied to a booking that contains a paid service, it cannot be overridden.

Thus in essence, by just keeping the latest update date it will only take into account the potential switch to a paid service, that is what really matters, and cannot change afterwards.

# 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: #22346
2024-10-04 13:16:08 +00:00
..
intermediate Keep latest booking to product bundle state 2024-10-04 10:32:15 +02:00
reporting more features into reporting 2024-10-02 10:57:30 +02:00
staging Merged PR 3000: Stg Hubspot form_submissions 2024-10-04 09:49:54 +00:00
doc_blocks.md improve stg_stripe__charges 2024-02-23 16:45:19 +01:00