edeposit_users to staging

This commit is contained in:
Joaquin Ossa 2024-09-02 11:33:21 +02:00
parent d8e6ee3ab0
commit b6a752fd74
3 changed files with 30 additions and 1 deletions

View file

@ -230,4 +230,6 @@ sources:
- name: VerificationToAddressValidation
identifier: VerificationToAddressValidation
- name: AccommodationToProductBundle
identifier: AccommodationToProductBundle
identifier: AccommodationToProductBundle
- name: ElectronicDepositUser
identifier: ElectronicDepositUser

View file

@ -191,6 +191,12 @@ models:
- name: stg_core__accommodation_to_product_bundle
columns:
- name: id_accommodation_to_product_bundle
tests:
- unique
- not_null
- name: stg_core__edeposit_user
columns:
- name: id
tests:
- unique
- not_null

View file

@ -0,0 +1,21 @@
with
raw_electronic_deposit_user as (
select * from {{ source("core", "ElectronicDepositUser") }}
),
stg_core__edeposit_user as (
select
{{ adapter.quote("Id") }} as id,
{{ adapter.quote("UserId") }} as id_user,
{{ adapter.quote("Currency") }} as currency,
{{ adapter.quote("NightlyFee") }} as nightly_fee,
{{ adapter.quote("CancellationFee") }} as cancellation_fee,
{{ adapter.quote("ProtectionLowerLevel") }} as protection_lower_level,
{{ adapter.quote("ProtectionUpperLevel") }} as protection_upper_level,
{{ adapter.quote("CreatedDate") }} as created_at_utc,
{{ adapter.quote("UpdatedDate") }} as updated_at_utc,
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
from raw_electronic_deposit_user
)
select *
from stg_core__edeposit_user