add staging model
This commit is contained in:
parent
68c509050f
commit
96d18116ed
1 changed files with 21 additions and 0 deletions
21
models/staging/core/stg_core__PayAway.sql
Normal file
21
models/staging/core/stg_core__PayAway.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
with
|
||||
raw_payaway as (select * from {{ source("core", "PayAway") }}),
|
||||
stg_core__payaway as (
|
||||
select
|
||||
{{ adapter.quote("Id") }} as id_payaway_plan,
|
||||
{{ adapter.quote("CurrencyId") }} as id_currency,
|
||||
{{ adapter.quote("SuperhogUserId") }} as id_user_host,
|
||||
{{ adapter.quote("StartDate") }} as start_at_utc,
|
||||
{{ adapter.quote("EndDate") }} as end_at_utc,
|
||||
{{ adapter.quote("EndDate") }} is null as has_no_end_date,
|
||||
{{ adapter.quote("PayAwayPercentage") }} as payaway_percentage,
|
||||
{{ adapter.quote("PayAwayMinimumCommission") }}
|
||||
as payaway_minimum_commission_local_curr,
|
||||
{{ 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_payaway
|
||||
)
|
||||
select *
|
||||
from stg_core__payaway
|
||||
Loading…
Add table
Add a link
Reference in a new issue