adapt superhog user

This commit is contained in:
Pablo Martin 2024-02-15 16:25:43 +01:00
parent 599d7085cf
commit dbf485bc39

View file

@ -1,16 +1,27 @@
with raw_superhog_user as (select * from {{ source("core", "superhog_user") }})
select
cast(superhoguserid as uuid) as id_superhoguser,
avatar as avatar,
airbnbid as id_airbnb,
airbnburl as airbnb_url,
createddate as created_date_utc,
updateddate as updated_date_utc,
verifieddate as verified_date_utc,
flagasproblem as flag_as_problem,
numberofproperties as number_of_properties,
superhogverifiedsetid as id_superhog_verified_set,
platformcommsrecipient as platform_comms_recipient,
othersharingplatformurl as other_sharing_platform_url,
userverificationstatusid as id_user_verification_status
from raw_superhog_user
with
raw_superhog_user as (select * from {{ source("core", "superhog_user") }}),
stg_core__superhog_user as (
select
{{ adapter.quote("Avatar") }} as avatar,
{{ adapter.quote("AirbnbId") }} as id_airbnb,
{{ adapter.quote("AirbnbUrl") }} as airbnb_url,
{{ adapter.quote("CreatedDate") }} as created_date_utc,
{{ adapter.quote("UpdatedDate") }} as updated_date_utc,
{{ adapter.quote("VerifiedDate") }} as verified_date_utc,
{{ adapter.quote("FlagAsProblem") }} as flag_as_problem,
{{ adapter.quote("SuperhogUserId") }} as id_superhoguser,
{{ adapter.quote("NumberOfProperties") }} as number_of_properties,
{{ adapter.quote("SuperhogVerifiedSetId") }} id_superhog_verified_set,
{{ adapter.quote("PlatformCommsRecipient") }} as platform_comms_recipient,
{{ adapter.quote("OtherSharingPlatformUrl") }}
as other_sharing_platform_url,
{{ adapter.quote("UserVerificationStatusId") }}
as id_user_verification_status
{{ adapter.quote("_airbyte_raw_id") }},
{{ adapter.quote("_airbyte_extracted_at") }},
{{ adapter.quote("_airbyte_meta") }}
from raw_superhog_user
)
select *
from stg_core__superhog_user