Merged PR 2796: Fixed model that wasn't mapping correctly
# Description Fixed model that wasn't mapping correctly because I am dumb # 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. Fixed model that wasn't mapping correctly Related work items: #20125
This commit is contained in:
commit
83d98c59b1
2 changed files with 5 additions and 4 deletions
|
|
@ -56,7 +56,8 @@ with
|
|||
end as rejected_fee_in_gbp,
|
||||
to_char(v.checkout_at_utc, 'YYYY-MM') as year_month_checkout
|
||||
from int_edeposit__verifications v
|
||||
inner join stg_core__edeposit_user eu on v.id_user_partner = eu.id_user_partner
|
||||
inner join
|
||||
stg_core__edeposit_user eu on {{ user_mapping_case }} = eu.id_user_partner
|
||||
left join
|
||||
int_daily_currency_exchange_rates cer
|
||||
on cer.from_currency = eu.currency
|
||||
|
|
@ -66,7 +67,7 @@ with
|
|||
),
|
||||
monthly_cancellation_threshold as (
|
||||
select
|
||||
id_user_partner,
|
||||
{{ user_mapping_case }} as id_user_partner,
|
||||
year_month_checkout,
|
||||
case
|
||||
when
|
||||
|
|
@ -75,7 +76,7 @@ with
|
|||
then true
|
||||
else false
|
||||
end as is_cancellation_threshold_surpassed
|
||||
from edeposit_records
|
||||
from edeposit_records v
|
||||
group by id_user_partner, year_month_checkout
|
||||
)
|
||||
select
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ with
|
|||
stg_core__edeposit_user as (
|
||||
select
|
||||
{{ adapter.quote("Id") }} as id,
|
||||
{{ user_mapping_case }} as id_user_partner,
|
||||
lower({{ adapter.quote("UserId") }}) as id_user_partner,
|
||||
-- this shitty thing right here is all because the currency is currently
|
||||
-- set up as a free text.
|
||||
-- they expect to fix this on the next update of E-deposit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue