Skip to content

Commit

Permalink
Merge pull request #80 from fivetran/bugfix/enabled-vars
Browse files Browse the repository at this point in the history
remove enabled_vars macro + more
  • Loading branch information
fivetran-jamie authored Aug 26, 2022
2 parents 93a30ea + 1039418 commit 198a840
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# dbt_hubspot_source v0.6.2
## Fixes
- Removes the `fivetran_utils.enabled_vars` macro from the configuration blocks of models dependent on `hubspot_service_enabled`, `hubspot_contact_merge_audit_enabled`, and `hubspot_ticket_deal_enabled`. This macro assumes its arguments to be true by default, which these variables are not. This produces conflicts if you do not provide explicit values for these variables in your root dbt_project.yml file.

# dbt_hubspot_source v0.6.1
## Fixes
- Removes default variable configs in the `dbt_project.yml` for `hubspot_service_enabled`, `hubspot_contact_merge_audit_enabled`, and `hubspot_ticket_deal_enabled`. Otherwise it will conflict with enable configs in the source tables.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a alt="License"
href="https://github.com/fivetran/dbt_salesforce_source/blob/main/LICENSE">
href="https://github.com/fivetran/dbt_hubspot_source/blob/main/LICENSE">
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" /></a>
<a alt="dbt-core">
<img src="https://img.shields.io/badge/dbt_Core™_version->=1.0.0_,<2.0.0-orange.svg" /></a>
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'hubspot_source'
version: '0.6.1'
version: '0.6.2'

config-version: 2
require-dbt-version: [">=1.0.0", "<2.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion models/stg_hubspot__contact_merge_audit.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_merge_audit_enabled'])) }}
{{ config(enabled=(var('hubspot_marketing_enabled', true) and var('hubspot_contact_merge_audit_enabled', false))) }}

with base as (

Expand Down
2 changes: 1 addition & 1 deletion models/stg_hubspot__ticket_deal.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_service_enabled','hubspot_ticket_deal_enabled'])) }}
{{ config(enabled=(var('hubspot_service_enabled', false) and var('hubspot_ticket_deal_enabled', false))) }}

with base as (

Expand Down
2 changes: 1 addition & 1 deletion models/tmp/stg_hubspot__contact_merge_audit_tmp.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_merge_audit_enabled'])) }}
{{ config(enabled=(var('hubspot_marketing_enabled', true) and var('hubspot_contact_merge_audit_enabled', false))) }}

select *
from {{ var('contact_merge_audit') }}
2 changes: 1 addition & 1 deletion models/tmp/stg_hubspot__ticket_company_tmp.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=var('hubspot_service_enabled', True)) }}
{{ config(enabled=var('hubspot_service_enabled', False)) }}

select *
from {{ var('ticket_company') }}
2 changes: 1 addition & 1 deletion models/tmp/stg_hubspot__ticket_contact_tmp.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=var('hubspot_service_enabled', True)) }}
{{ config(enabled=var('hubspot_service_enabled', False)) }}

select *
from {{ var('ticket_contact') }}
2 changes: 1 addition & 1 deletion models/tmp/stg_hubspot__ticket_deal_tmp.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_service_enabled','hubspot_ticket_deal_enabled'])) }}
{{ config(enabled=(var('hubspot_service_enabled', false) and var('hubspot_ticket_deal_enabled', false))) }}

select *
from {{ var('ticket_deal') }}
2 changes: 1 addition & 1 deletion models/tmp/stg_hubspot__ticket_engagement_tmp.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=var('hubspot_service_enabled', True)) }}
{{ config(enabled=var('hubspot_service_enabled', False)) }}

select *
from {{ var('ticket_engagement') }}
2 changes: 1 addition & 1 deletion models/tmp/stg_hubspot__ticket_property_history_tmp.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=var('hubspot_service_enabled', True)) }}
{{ config(enabled=var('hubspot_service_enabled', False)) }}

select *
from {{ var('ticket_property_history') }}
2 changes: 1 addition & 1 deletion models/tmp/stg_hubspot__ticket_tmp.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=var('hubspot_service_enabled', True)) }}
{{ config(enabled=var('hubspot_service_enabled', False)) }}

select *
from {{ var('ticket') }}

0 comments on commit 198a840

Please sign in to comment.