add table aliases to track col origin
This commit is contained in:
parent
8ba2ece28b
commit
8b99d9babd
1 changed files with 35 additions and 35 deletions
|
|
@ -3,42 +3,42 @@ with
|
||||||
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") }})
|
stg_core__currency as (select * from {{ ref("stg_core__currency") }})
|
||||||
select
|
select
|
||||||
id_user,
|
u.id_user,
|
||||||
id_account_type,
|
u.id_account_type,
|
||||||
id_billing_country,
|
u.id_billing_country,
|
||||||
c.iso4217_code as account_currency_iso4217,
|
c.iso4217_code as account_currency_iso4217,
|
||||||
user_code,
|
u.user_code,
|
||||||
first_name,
|
u.first_name,
|
||||||
last_name,
|
u.last_name,
|
||||||
email,
|
u.email,
|
||||||
title,
|
u.title,
|
||||||
id_deal,
|
u.id_deal,
|
||||||
is_deleted,
|
u.is_deleted,
|
||||||
joined_at_utc,
|
u.joined_at_utc,
|
||||||
joined_date_utc,
|
u.joined_date_utc,
|
||||||
user_name,
|
u.user_name,
|
||||||
code_prefix,
|
u.code_prefix,
|
||||||
billing_town,
|
u.billing_town,
|
||||||
company_name,
|
u.company_name,
|
||||||
is_email_confirmed,
|
u.is_email_confirmed,
|
||||||
is_lockout_enabled,
|
u.is_lockout_enabled,
|
||||||
billing_postcode,
|
u.billing_postcode,
|
||||||
is_twofactor_enabled,
|
u.is_twofactor_enabled,
|
||||||
access_failed_count,
|
u.access_failed_count,
|
||||||
lockout_end_date_utc,
|
u.lockout_end_date_utc,
|
||||||
avatar,
|
su.avatar,
|
||||||
id_airbnb,
|
su.id_airbnb,
|
||||||
airbnb_url,
|
su.airbnb_url,
|
||||||
created_date_utc,
|
su.created_date_utc,
|
||||||
updated_date_utc,
|
su.updated_date_utc,
|
||||||
verified_at_utc,
|
su.verified_at_utc,
|
||||||
verified_date_utc,
|
su.verified_date_utc,
|
||||||
flag_as_problem,
|
su.flag_as_problem,
|
||||||
number_of_properties,
|
su.number_of_properties,
|
||||||
id_superhog_verified_set,
|
su.id_superhog_verified_set,
|
||||||
platform_comms_recipient,
|
su.platform_comms_recipient,
|
||||||
other_sharing_platform_url,
|
su.other_sharing_platform_url,
|
||||||
id_user_verification_status
|
su.id_user_verification_status
|
||||||
from stg_core__user as u
|
from stg_core__user as u
|
||||||
inner join stg_core__superhog_user as su on u.id_user = su.id_superhoguser
|
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
|
left join stg_core__currency c on u.id_account_currency = c.id_currency
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue