From 53eb97acccd6e72c5325c344fbfeb4e9aec38823 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Tue, 23 Apr 2024 13:33:15 +0200 Subject: [PATCH] Created staging model for verification set to verification type --- models/staging/core/_core_sources.yml | 2 ++ ..._verification_set_to_verification_type.sql | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 models/staging/core/stg_core__verification_set_to_verification_type.sql diff --git a/models/staging/core/_core_sources.yml b/models/staging/core/_core_sources.yml index 037c9b2..105293c 100644 --- a/models/staging/core/_core_sources.yml +++ b/models/staging/core/_core_sources.yml @@ -177,6 +177,8 @@ sources: identifier: VerificationToPayment - name: VerificationPaymentType identifier: VerificationPaymentType + - name: VerificationSetToVerificationType + identifier: VerificationSetToVerificationType - name: Payment identifier: Payment - name: PaymentStatus diff --git a/models/staging/core/stg_core__verification_set_to_verification_type.sql b/models/staging/core/stg_core__verification_set_to_verification_type.sql new file mode 100644 index 0000000..4c4338a --- /dev/null +++ b/models/staging/core/stg_core__verification_set_to_verification_type.sql @@ -0,0 +1,23 @@ +with + raw_verificationsettoverificationtype as ( + select * from {{ source("core", "VerificationSetToVerificationType") }} + ), + stg_core__verification_set_to_verification_type as ( + select + {{ adapter.quote("Id") }} as id_verification_set_to_verification_type, + {{ adapter.quote("VerificationSetId") }} as id_verification_set, + {{ adapter.quote("VerificationTypeId") }} as id_verification_type, + {{ adapter.quote("Rules") }} as rules, + {{ adapter.quote("Hidden") }} as is_hidden, + {{ adapter.quote("MetaData") }} as metadata, + {{ adapter.quote("SortOrder") }} as sort_order, + {{ 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 updated_date_utc, + {{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc + + from raw_verificationsettoverificationtype + ) +select * +from stg_core__verification_set_to_verification_type