From 4cda82fe48abd041614d1ab3c410a50e937c6f3f Mon Sep 17 00:00:00 2001 From: Joaquin Date: Mon, 30 Jun 2025 14:25:39 +0200 Subject: [PATCH] duplicated payments temporal fix --- models/staging/core/schema.yml | 8 ++++++++ ...ication_request_guest_product_to_payment.sql | 17 ++++------------- ...e__verification_request_to_guest_product.sql | 17 ++++------------- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/models/staging/core/schema.yml b/models/staging/core/schema.yml index e9cad40..33165c0 100644 --- a/models/staging/core/schema.yml +++ b/models/staging/core/schema.yml @@ -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 diff --git a/models/staging/core/stg_core__verification_request_guest_product_to_payment.sql b/models/staging/core/stg_core__verification_request_guest_product_to_payment.sql index 6c3c00a..4dd4160 100644 --- a/models/staging/core/stg_core__verification_request_guest_product_to_payment.sql +++ b/models/staging/core/stg_core__verification_request_guest_product_to_payment.sql @@ -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') diff --git a/models/staging/core/stg_core__verification_request_to_guest_product.sql b/models/staging/core/stg_core__verification_request_to_guest_product.sql index 466f231..0a2a4a8 100644 --- a/models/staging/core/stg_core__verification_request_to_guest_product.sql +++ b/models/staging/core/stg_core__verification_request_to_guest_product.sql @@ -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')