data-dwh-dbt-project/models/intermediate
Joaquin Ossa fdd58fd55e Merged PR 4387: Adding booking services status
# Description

Need opinion on this model, it's not so easy so if needed we can have a quick call
- Since the `int_core__booking_service_detail` has some services combined in one I tried to split them to count separately each service per booking and their statuses. There are also some cases where there are services combined but also separate for the same booking, in those cases I only take in count the status of the service with the most recent `service_detail_updated_at_utc `
![image (2).png](https://guardhog.visualstudio.com/4148d95f-4b6d-4205-bcff-e9c8e0d2ca65/_apis/git/repositories/54ac356f-aad7-46d2-b62c-e8c5b3bb8ebf/pullRequests/4387/attachments/image%20%282%29.png)
So here it takes for the `BASIC DAMAGE DEPOSIT` the status Paid which is more recent but for `WAIVER PLUS` the status Not Paid.
- I created a macro to count all the distinct bookings with each `service_status` that also adds the column name. If there are new statuses being used we would have to add them to the macro as well as calling the new columns on the final select. Might not be the most optimal approach WDYT??

**The PR is not ready to be closed**

# Checklist

- [x] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] The edited models contain PK tests, and I've ran and passed them.
- [ ] I have checked for DRY opportunities with other models and docs.
- [ ] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Adding booking services status

Related work items: #25934
2025-02-14 08:16:59 +00:00
..
athena Merged PR 4106: Avoids duplicates in athena verification with fees after price changes 2025-01-19 10:07:39 +00:00
check_in_hero back to created date 2025-01-21 10:18:46 +01:00
core Addressed comments 2025-02-14 08:35:51 +01:00
cross Merged PR 4326: Remove cancelled Bookings. Adds index in mtd_aggregated_metrics 2025-02-10 13:14:31 +00:00
edeposit change "tests:" to "data_tests:" 2025-01-13 16:00:35 +01:00
hubspot change "tests:" to "data_tests:" 2025-01-13 16:00:35 +01:00
kpis Merged PR 4395: Propagates business scope into Deal/Listing metrics 2025-02-13 16:34:14 +00:00
screen_and_protect change "tests:" to "data_tests:" 2025-01-13 16:00:35 +01:00
xero Merged PR 4228: First version of sales - monthly trends 2025-01-31 08:33:15 +00:00