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