model
This commit is contained in:
parent
2f133c1424
commit
83f67a06bf
1 changed files with 23 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
{{ config(materialized="incremental", unique_key="id_verification_request") }}
|
||||
|
||||
with
|
||||
raw_guest_satisfaction as (select * from {{ source("core", "GuestSatisfaction") }}),
|
||||
stg_core__guest_satisfaction_responses as (
|
||||
select
|
||||
{{ adapter.quote("VerificationRequestId") }} as id_verification_request,
|
||||
{{ adapter.quote("ExperienceRating") }} as experience_rating,
|
||||
{{ adapter.quote("IsContactable") }} as is_contactable,
|
||||
{{ adapter.quote("Comments") }} as guest_comments,
|
||||
{{ 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_guest_satisfaction
|
||||
)
|
||||
select *
|
||||
from stg_core__guest_satisfaction_responses
|
||||
{% if is_incremental() %}
|
||||
where
|
||||
updated_at_utc
|
||||
>= ((select max(updated_at_utc) from {{ this }}) - interval '7 days')
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue