duplicated payments temporal fix

This commit is contained in:
Joaquin 2025-06-30 14:25:39 +02:00
parent 61c1509337
commit 4cda82fe48
3 changed files with 16 additions and 26 deletions

View file

@ -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

View file

@ -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')

View file

@ -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')