staging model for integration table

This commit is contained in:
Pablo Martin 2024-06-04 14:51:03 +02:00
parent 929628bc7c
commit a312b1730b

View file

@ -0,0 +1,24 @@
with
raw_integration as (select * from {{ source("core", "Integration") }}),
stg_core__integration as (
select
{{ adapter.quote("Id") }} as id_integration,
{{ adapter.quote("Identifier") }} as uuid_integration,
{{ adapter.quote("SuperhogUserId") }} as id_superhog_user,
{{ adapter.quote("IntegrationTypeId") }} id_integration_type,
{{ adapter.quote("IsActive") }} as is_active,
{{ adapter.quote("LoggingIsActive") }} as is_logging_active,
{{ adapter.quote("IsStayImportingEnabled") }} as is_stay_importing_enabled,
{{ adapter.quote("IgnoreStaysOnFirstImport") }}
as ignore_stays_on_first_import,
{{ adapter.quote("CreatedByCutOffDate") }} as cutoff_date,
{{ adapter.quote("AuthenticationConfiguration") }} authentication_configuration,
{{ adapter.quote("CreatedDate") }} as created_at_utc,
{{ adapter.quote("UpdatedDate") }} as updated_at_utc,
{{ adapter.quote("DateDeleted") }} as deleted_at_utc,
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
from raw_integration
)
select *
from stg_core__integration