diff --git a/models/staging/core/_core_sources.yml b/models/staging/core/_core_sources.yml index f680cad..12ae258 100644 --- a/models/staging/core/_core_sources.yml +++ b/models/staging/core/_core_sources.yml @@ -201,4 +201,7 @@ sources: identifier: PricePlanChargedByType - name: Currency identifier: Currency - + - name: Integration + identifier: Integration + - name: IntegrationType + identifier: IntegrationType diff --git a/models/staging/core/stg_core__integration.sql b/models/staging/core/stg_core__integration.sql new file mode 100644 index 0000000..17d5f3e --- /dev/null +++ b/models/staging/core/stg_core__integration.sql @@ -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 diff --git a/models/staging/core/stg_core__integration_type.sql b/models/staging/core/stg_core__integration_type.sql new file mode 100644 index 0000000..0296a79 --- /dev/null +++ b/models/staging/core/stg_core__integration_type.sql @@ -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