Merged PR 5573: Duplicated payments temporal fix
# Description Temporary fix for duplicated payments, this affects 2 models. They use to be incremental but since they are small this was changed and added the filter to exclude the duplicated records. I left the deprecation date as 31/07/2025 # 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. - [ ] 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. duplicated payments temporal fix Related work items: #31324
This commit is contained in:
commit
ca939e0c69
3 changed files with 16 additions and 26 deletions
|
|
@ -1886,6 +1886,10 @@ models:
|
|||
This table is used to track the verification requests that are related to a
|
||||
specific guest product.
|
||||
|
||||
Deprecating in the future the temporary fix due to duplicated payments
|
||||
where we filter `id_verification_request_to_guest_product <> 773`
|
||||
deprecation_date: 2025-07-31
|
||||
|
||||
columns:
|
||||
- name: id_verification_request_to_guest_product
|
||||
data_type: bigint
|
||||
|
|
@ -1961,6 +1965,10 @@ models:
|
|||
This table is used to track the verification requests from a guest product
|
||||
to a payment.
|
||||
|
||||
Deprecating in the future the temporary fix due to duplicated payments
|
||||
where we filter `id_verification_request_guest_product_to_payment <> 103`
|
||||
deprecation_date: 2025-07-31
|
||||
|
||||
columns:
|
||||
- name: id_verification_request_guest_product_to_payment
|
||||
data_type: bigint
|
||||
|
|
|
|||
|
|
@ -1,11 +1,3 @@
|
|||
{{
|
||||
config(
|
||||
materialized="incremental",
|
||||
unique_key="id_verification_request_to_guest_product",
|
||||
)
|
||||
}}
|
||||
|
||||
|
||||
with
|
||||
raw_verification_request_guest_product_to_payment as (
|
||||
select * from {{ source("core", "VerificationRequestGuestProductToPayment") }}
|
||||
|
|
@ -28,8 +20,7 @@ with
|
|||
)
|
||||
select *
|
||||
from stg_core__verification_request_guest_product_to_payment
|
||||
{% if is_incremental() %}
|
||||
where
|
||||
updated_at_utc
|
||||
>= ((select max(updated_at_utc) from {{ this }}) - interval '7 days')
|
||||
{% endif %}
|
||||
where
|
||||
current_date < date('2025-07-27') -- Temporary fix due to duplicated payments
|
||||
and id_verification_request_guest_product_to_payment <> 103
|
||||
or current_date >= date('2025-07-27')
|
||||
|
|
|
|||
|
|
@ -1,11 +1,3 @@
|
|||
{{
|
||||
config(
|
||||
materialized="incremental",
|
||||
unique_key="id_verification_request_to_guest_product",
|
||||
)
|
||||
}}
|
||||
|
||||
|
||||
with
|
||||
raw_verification_request_to_guest_product as (
|
||||
select * from {{ source("core", "VerificationRequestToGuestProduct") }}
|
||||
|
|
@ -30,8 +22,7 @@ with
|
|||
)
|
||||
select *
|
||||
from stg_core__verification_request_to_guest_product
|
||||
{% if is_incremental() %}
|
||||
where
|
||||
updated_at_utc
|
||||
>= ((select max(updated_at_utc) from {{ this }}) - interval '7 days')
|
||||
{% endif %}
|
||||
where
|
||||
current_date < date('2025-07-27') -- Temporary fix due to duplicated payments
|
||||
and id_verification_request_to_guest_product <> 773
|
||||
or current_date >= date('2025-07-27')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue