From 5c64bf8b2047b3c86ef14d3b1778e1529c22baa4 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Mon, 14 Oct 2024 11:47:44 +0200 Subject: [PATCH] schema and final touches for deal pipeline --- models/staging/hubspot/schema.yml | 39 +++++++++++++++++++ .../hubspot/stg_hubspot__deal_pipelines.sql | 1 - 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/models/staging/hubspot/schema.yml b/models/staging/hubspot/schema.yml index c7b71e3..0215fad 100644 --- a/models/staging/hubspot/schema.yml +++ b/models/staging/hubspot/schema.yml @@ -164,3 +164,42 @@ models: description: "Timestamp of when data was extracted to DWH." tests: - not_null + + - name: stg_hubspot__deal_pipelines + description: | + Details of the different deal pipelines. Deal pipelines are templates + for the stages a deal can go through. Typically, a deal can only be + in one pipeline. Pipelines have stages, which are stored in a different + table. + columns: + - name: id_deal_pipeline + data_type: character varying + description: "Unique id for each pipeline." + tests: + - not_null + - unique + + - name: deal_pipeline_name + data_type: character varying + description: Name for the pipeline. + tests: + - not_null + - unique + + - name: is_active + data_type: boolean + description: Flag indicating if the pipeline is currently active. + tests: + - not_null + + - name: created_at_utc + data_type: timestamp + description: When was this record created. + tests: + - not_null + + - name: updated_at_utc + data_type: timestamp + description: When was this record last updated. + tests: + - not_null diff --git a/models/staging/hubspot/stg_hubspot__deal_pipelines.sql b/models/staging/hubspot/stg_hubspot__deal_pipelines.sql index 9ca4604..d9d281f 100644 --- a/models/staging/hubspot/stg_hubspot__deal_pipelines.sql +++ b/models/staging/hubspot/stg_hubspot__deal_pipelines.sql @@ -5,7 +5,6 @@ with {{ 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