From c051831d6d64d873fed9b351a36436a4a57df163 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Tue, 18 Jun 2024 13:09:45 +0200 Subject: [PATCH] upper in payments --- models/staging/core/stg_core__payment.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/models/staging/core/stg_core__payment.sql b/models/staging/core/stg_core__payment.sql index e6dce40..8752380 100644 --- a/models/staging/core/stg_core__payment.sql +++ b/models/staging/core/stg_core__payment.sql @@ -12,7 +12,12 @@ with cast({{ adapter.quote("RefundDate") }} as date) as refunded_date_utc, {{ adapter.quote("CreatedDate") }} as created_at_utc, cast({{ adapter.quote("CreatedDate") }} as date) as created_date_utc, - {{ adapter.quote("CurrencyIso") }} as currency, + -- The field in SQL Server is this funny case insensitive shit that is + -- supposed to not be case sensitive due to the db collation but somehow + -- does store different cases. There is one pesky record where EUR is + -- stored as Eur. I placed this upper to save us from this and future + -- weird ones. + upper({{ adapter.quote("CurrencyIso") }}) as currency, {{ adapter.quote("PaymentDate") }} as paid_at_utc, cast({{ adapter.quote("PaymentDate") }} as date) as paid_date_utc, {{ adapter.quote("UpdatedDate") }} as updated_at_utc,