From 90f67d63217f777749bdea7236f6cffbb41ac7b9 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Fri, 24 May 2024 11:54:40 +0200 Subject: [PATCH] include currency in unified user --- models/intermediate/core/int_core__unified_user.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/models/intermediate/core/int_core__unified_user.sql b/models/intermediate/core/int_core__unified_user.sql index 7c475e5..36616a7 100644 --- a/models/intermediate/core/int_core__unified_user.sql +++ b/models/intermediate/core/int_core__unified_user.sql @@ -1,11 +1,12 @@ with stg_core__user as (select * from {{ ref("stg_core__user") }}), - stg_core__superhog_user as (select * from {{ ref("stg_core__superhog_user") }}) + stg_core__superhog_user as (select * from {{ ref("stg_core__superhog_user") }}), + stg_core__currency as (select * from {{ ref("stg_core__currency") }}) select id_user, id_account_type, id_billing_country, - id_account_currency, + c.iso4217_code as account_currency_iso4217, user_code, first_name, last_name, @@ -41,3 +42,4 @@ select id_user_verification_status from stg_core__user as u inner join stg_core__superhog_user as su on u.id_user = su.id_superhoguser +left join stg_core__currency c on u.id_account_currency = c.id_currency