diff --git a/models/staging/core/_core_sources.yml b/models/staging/core/_core_sources.yml index 105293c..12fbd62 100644 --- a/models/staging/core/_core_sources.yml +++ b/models/staging/core/_core_sources.yml @@ -171,6 +171,8 @@ sources: identifier: SuperhogUser - name: UserVerificationStatus identifier: UserVerificationStatus + - name: Verification + identifier: Verification - name: VerificationRequest identifier: VerificationRequest - name: VerificationToPayment diff --git a/models/staging/core/stg_core__verification.sql b/models/staging/core/stg_core__verification.sql new file mode 100644 index 0000000..61b5bc0 --- /dev/null +++ b/models/staging/core/stg_core__verification.sql @@ -0,0 +1,24 @@ +with + raw_verification as (select * from {{ source("core", "Verification") }}), + stg_core__verification as ( + select + {{ adapter.quote("Id") }} as id_verification, + {{ adapter.quote("SuperhogUserId") }} as id_user_guest, + {{ adapter.quote("VerificationStatusId") }} as id_verification_status, + {{ adapter.quote("VerificationRequestId") }} as id_verification_request, + {{ adapter.quote("Name") }} as verification, + {{ adapter.quote("Value") }} as verification_value, + {{ adapter.quote("MetaData") }} as metadata, + {{ adapter.quote("Provider") }} as verification_provider, + {{ adapter.quote("CreatedDate") }} as created_at_utc, + cast({{ adapter.quote("CreatedDate") }} as date) as created_date_utc, + {{ adapter.quote("UpdatedDate") }} as updated_at_utc, + cast({{ adapter.quote("UpdatedDate") }} as date) as update_date_utc, + {{ adapter.quote("DeletedDate") }} as deleted_at_utc, + cast({{ adapter.quote("DeletedDate") }} as date) as deleted_date_utc, + {{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc + + from raw_verification + ) +select * +from stg_core__verification