data-dwh-dbt-project/models
Pablo Martin 20477dcc2c Merged PR 5447: Fix GJ Payments consistency with VRs
# Description

We're getting Data Alerts triggered for Guest Journey payments with no id for the guest. This is because we have payments in the DWH for which we still don't have the related Verification Request in the DWH as well.

This PR changes a `LEFT JOIN` with the verification request table into an `INNER JOIN`, effectively making it impossible for a payment to not have user data if the VR is not there.

We increase data latency (the payment won't show up until the related VR is in the DWH) but we win consistency (no orphan payments without their full details).

# 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.

change left join to inner join
2025-06-12 08:06:08 +00:00
..
intermediate Merged PR 5447: Fix GJ Payments consistency with VRs 2025-06-12 08:06:08 +00:00
reporting Addressed comments 2025-06-12 09:22:22 +02:00
staging Removed test 2025-06-11 14:51:20 +02:00
doc_blocks.md improve stg_stripe__charges 2024-02-23 16:45:19 +01:00