diff --git a/.circleci/config.yml b/.circleci/config.yml index 5542e84..e6a52dd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,9 +31,9 @@ jobs: dbt deps dbt seed --target redshift --full-refresh dbt run --target redshift --full-refresh - dbt run --vars '{hubspot_marketing_enabled: true, hubspot_sales_enabled: false}' --target redshift - dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: true}' --target redshift - dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: false}' --target redshift + dbt run --vars '{hubspot_marketing_enabled: true, hubspot_sales_enabled: false}' --target redshift --full-refresh + dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: true}' --target redshift --full-refresh + dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: false}' --target redshift --full-refresh dbt test --target redshift - run: name: "Run Tests - Snowflake" @@ -44,9 +44,9 @@ jobs: dbt deps dbt seed --target snowflake --full-refresh dbt run --target snowflake --full-refresh - dbt run --vars '{hubspot_marketing_enabled: true, hubspot_sales_enabled: false}' --target snowflake - dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: true}' --target snowflake - dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: false}' --target snowflake + dbt run --vars '{hubspot_marketing_enabled: true, hubspot_sales_enabled: false}' --target snowflake --full-refresh + dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: true}' --target snowflake --full-refresh + dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: false}' --target snowflake --full-refresh dbt test --target snowflake - run: name: "Run Tests - BigQuery" @@ -60,7 +60,7 @@ jobs: dbt deps dbt seed --target bigquery --full-refresh dbt run --target bigquery --full-refresh - dbt run --vars '{hubspot_marketing_enabled: true, hubspot_sales_enabled: false}' --target bigquery - dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: true}' --target bigquery - dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: false}' --target bigquery + dbt run --vars '{hubspot_marketing_enabled: true, hubspot_sales_enabled: false}' --target bigquery --full-refresh + dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: true}' --target bigquery --full-refresh + dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: false}' --target bigquery --full-refresh dbt test --target bigquery diff --git a/dbt_project.yml b/dbt_project.yml index 4735fd9..016bf35 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'hubspot' -version: '0.3.0' +version: '0.3.1' config-version: 2 require-dbt-version: [">=0.18.0", "<0.20.0"] diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index fd72f06..0c8c398 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,6 +1,6 @@ name: 'hubspot_integration_tests' -version: '0.3.0' +version: '0.3.1' profile: 'integration_tests' config-version: 2 diff --git a/models/sales/hubspot__deals.sql b/models/sales/hubspot__deals.sql index b465d13..4ba0ae1 100644 --- a/models/sales/hubspot__deals.sql +++ b/models/sales/hubspot__deals.sql @@ -20,13 +20,6 @@ with deals as ( select * from {{ var('owner') }} -{% if var('hubspot_company_enabled', True) %} -), companies as ( - - select * - from {{ var('deal_company') }} -{% endif %} - ), deal_fields_joined as ( select @@ -36,10 +29,6 @@ with deals as ( owners.email_address as owner_email_address, owners.full_name as owner_full_name - {% if var('hubspot_company_enabled', True) %} - , companies.company_id - {% endif %} - from deals left join pipelines using (deal_pipeline_id) @@ -48,11 +37,6 @@ with deals as ( left join owners using (owner_id) - {% if var('hubspot_company_enabled', True) %} - left join companies - on deals.deal_id = companies.deal_id - {% endif %} - {% if fivetran_utils.enabled_vars(['hubspot_engagement_enabled','hubspot_engagement_deal_enabled']) %} ), engagements as ( diff --git a/models/sales/sales.yml b/models/sales/sales.yml index 1f59c89..8d95f53 100644 --- a/models/sales/sales.yml +++ b/models/sales/sales.yml @@ -58,11 +58,8 @@ models: - name: owner_full_name description: The full name of the deal's owner. - - - name: company_id - description: ID of the deal's associated company. - + - name: hubspot__companies description: Each record represents a company in Hubspot. columns: