Merged PR 1969: Integration models
This PR brings two tables from Core's `integration` schema into `staging`. - `integration` - `integration_type` Related work items: #16919
This commit is contained in:
commit
42a3190f50
3 changed files with 52 additions and 1 deletions
|
|
@ -201,4 +201,7 @@ sources:
|
|||
identifier: PricePlanChargedByType
|
||||
- name: Currency
|
||||
identifier: Currency
|
||||
|
||||
- name: Integration
|
||||
identifier: Integration
|
||||
- name: IntegrationType
|
||||
identifier: IntegrationType
|
||||
|
|
|
|||
24
models/staging/core/stg_core__integration.sql
Normal file
24
models/staging/core/stg_core__integration.sql
Normal 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_utc,
|
||||
{{ 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
|
||||
24
models/staging/core/stg_core__integration_type.sql
Normal file
24
models/staging/core/stg_core__integration_type.sql
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
with
|
||||
raw_integration_type as (select * from {{ source("core", "IntegrationType") }}),
|
||||
stg_core__integration_type as (
|
||||
select
|
||||
{{ adapter.quote("Id") }} as id_integration_type,
|
||||
{{ adapter.quote("AuthenticationTypeId") }} as id_authentication_type,
|
||||
{{ adapter.quote("Logo") }} as logo,
|
||||
{{ adapter.quote("Name") }} as integration_type,
|
||||
{{ adapter.quote("IsHidden") }} as is_hidden,
|
||||
{{ adapter.quote("DisplayName") }} as display_name,
|
||||
{{ adapter.quote("Configuration") }} as integration_type_configuration,
|
||||
{{ adapter.quote("IsWebhookKygEnabled") }} as is_webhook_kyg_enabled,
|
||||
{{ adapter.quote("CreatedDateCutOffAllowed") }}
|
||||
as is_created_date_cutoff_allowed,
|
||||
{{ adapter.quote("IsWebhookSuperhogEnabled") }}
|
||||
as is_webhook_superhog_enabled,
|
||||
{{ 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_integration_type
|
||||
)
|
||||
select *
|
||||
from stg_core__integration_type
|
||||
Loading…
Add table
Add a link
Reference in a new issue