staging model for payment validation set to currency

This commit is contained in:
Pablo Martin 2024-04-26 17:36:50 +02:00
parent 1d8fc0d6fa
commit 71b0862f04

View file

@ -0,0 +1,31 @@
with
raw_payment_validation_set_to_currency as (
select * from {{ source("core", "PaymentValidationSetToCurrency") }}
),
stg_core__payment_validation_set_to_currency as (
select
{{ adapter.quote("Id") }} as id_payment_validation_set_to_currency,
{{ adapter.quote("PaymentValidationSetId") }} as id_payment_validation_set,
{{ adapter.quote("Fee") }} as guest_fee_local_curr,
{{ adapter.quote("Amount") }} as deposit_amount_local_curr,
{{ adapter.quote("Waiver") }} as waiver_guest_fee_amount_local_curr,
{{ adapter.quote("Protection") }} as waiver_protection_amount_local_curr,
{{ adapter.quote("CancellationCoverCostA") }}
as checkin_cover_guest_fee_local_curr,
{{ adapter.quote("CancellationCoverLimitA") }}
as checkin_cover_cover_amount_local_curr,
{{ adapter.quote("Reschedule") }} as reschedule,
{{ adapter.quote("CurrencyIso") }} as local_currency_iso_4217,
{{ adapter.quote("IsFeeRefundable") }} as is_fee_refundable,
{{ adapter.quote("DisabledValidationOptions") }}
as disabled_validation_options,
{{ 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_payment_validation_set_to_currency
)
select *
from stg_core__payment_validation_set_to_currency