data-dwh-dbt-project/models
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
..
intermediate Merged PR 4387: Adding booking services status 2025-02-14 08:16:59 +00:00
reporting Addressed comments 2025-02-14 08:35:51 +01:00
staging fix commit 2025-02-07 12:40:22 +01:00
doc_blocks.md improve stg_stripe__charges 2024-02-23 16:45:19 +01:00