diff --git a/models/staging/hubspot/_hubspot_sources.yml b/models/staging/hubspot/_hubspot_sources.yml index 9450245..64b4075 100644 --- a/models/staging/hubspot/_hubspot_sources.yml +++ b/models/staging/hubspot/_hubspot_sources.yml @@ -10,3 +10,5 @@ sources: identifier: deals - name: form_submissions identifier: form_submissions + - name: deal_pipelines + identifier: deal_pipelines diff --git a/models/staging/hubspot/stg_hubspot__deal_pipelines.sql b/models/staging/hubspot/stg_hubspot__deal_pipelines.sql new file mode 100644 index 0000000..9ca4604 --- /dev/null +++ b/models/staging/hubspot/stg_hubspot__deal_pipelines.sql @@ -0,0 +1,16 @@ +with + raw_deal_pipelines as (select * from {{ source("hubspot", "deal_pipelines") }}), + stg_hubspot__deal_pipelines as ( + select + {{ adapter.quote("pipelineId") }} as id_deal_pipeline, + {{ adapter.quote("label") }} as deal_pipeline_name, + {{ adapter.quote("active") }} as is_active, + {{ adapter.quote("default") }} as is_default, + {{ adapter.quote("createdAt") }} as created_at_utc, + {{ adapter.quote("updatedAt") }} as updated_at_utc, + {{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc + + from raw_deal_pipelines + ) +select * +from stg_hubspot__deal_pipelines