Skip to content

Commit

Permalink
Compilation error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-avinash committed May 10, 2024
1 parent 8e6bf3e commit 8d35ba0
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 76 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# dbt_hubspot v0.17.2
[PR #142](https://github.com/fivetran/dbt_hubspot/pull/142) includes the following updates:

## 🪲 Bug Fixes 🪛
- Fixed the `fivetran_utils.enabled_vars` conditional by adding the `hubspot_contact_list_member_enabled` variable in `hubspot_contact_lists` to solve for compilation errors when the `contact_list` source table is not being used. If `hubspot_contact_list_member_enabled` is `true`, `int_hubspot__email_metrics__by_contact_list` is now brought in as a dependency, and ignored otherwise.

## 🚘 Under the Hood 🚘
- Updated the `integration_tests/dbt_project.yml` variables to be global to ensure more effective testing of our seed data.

# dbt_hubspot v0.17.1
[PR #140](https://github.com/fivetran/dbt_hubspot/pull/140) includes the following updates:

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'
version: '0.17.1'
version: '0.17.2'

config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ integration_tests:
pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
port: 5439
schema: hubspot_integration_tests_55
schema: hubspot_integration_tests_56
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: hubspot_integration_tests_55
schema: hubspot_integration_tests_56
threads: 8
keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}"
snowflake:
Expand All @@ -33,7 +33,7 @@ integration_tests:
role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}"
database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}"
warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}"
schema: hubspot_integration_tests_55
schema: hubspot_integration_tests_56
threads: 8
postgres:
type: postgres
Expand All @@ -42,13 +42,13 @@ integration_tests:
pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
port: 5432
schema: hubspot_integration_tests_55
schema: hubspot_integration_tests_56
threads: 8
databricks:
catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}"
host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}"
schema: hubspot_integration_tests_55
schema: hubspot_integration_tests_56
threads: 8
token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
type: databricks
121 changes: 60 additions & 61 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,68 @@
name: 'hubspot_integration_tests'
version: '0.17.1'
version: '0.17.2'

profile: 'integration_tests'
config-version: 2
vars:
hubspot_schema: hubspot_integration_tests_55
hubspot_source:
hubspot_service_enabled: true
# hubspot_sales_enabled: true # enable when generating docs
# hubspot_marketing_enabled: true # enable when generating docs
# hubspot_contact_merge_audit_enabled: true # enable when generating docs
# hubspot_using_all_email_events: true # enable when generating docs
# hubspot_merged_deal_enabled: true # enable when generating docs
hubspot_contact_list_member_enabled: false
hubspot_email_event_enabled: true
hubspot_contact_enabled: true
hubspot_email_event_sent_enabled: true
hubspot_company_property_history_identifier: "company_property_history_data"
hubspot_company_identifier: "company_data"
hubspot_contact_identifier: "contact_data"
hubspot_contact_merge_audit_identifier: "contact_merge_audit_data"
hubspot_contact_list_member_identifier: "contact_list_member_data"
hubspot_contact_property_history_identifier: "contact_property_history_data"
hubspot_deal_identifier: "deal_data"
hubspot_deal_stage_identifier: "deal_stage_data"
hubspot_deal_company_identifier: "deal_company_data"
hubspot_deal_contact_identifier: "deal_contact_data"
hubspot_deal_pipeline_identifier: "deal_pipeline_data"
hubspot_deal_pipeline_stage_identifier: "deal_pipeline_stage_data"
hubspot_deal_property_history_identifier: "deal_property_history_data"
hubspot_email_campaign_identifier: "email_campaign_data"
hubspot_email_event_identifier: "email_event_data"
hubspot_email_event_bounce_identifier: "email_event_bounce_data"
hubspot_email_event_click_identifier: "email_event_click_data"
hubspot_email_event_deferred_identifier: "email_event_deferred_data"
hubspot_email_event_delivered_identifier: "email_event_delivered_data"
hubspot_email_event_forward_identifier: "email_event_forward_data"
hubspot_email_event_open_identifier: "email_event_open_data"
hubspot_email_event_print_identifier: "email_event_print_data"
hubspot_email_event_spam_report_identifier: "email_event_spam_report_data"
hubspot_email_event_status_change_identifier: "email_event_status_change_data"
hubspot_engagement_identifier: "engagement_data"
hubspot_engagement_call_identifier: "engagement_call_data"
hubspot_engagement_company_identifier: "engagement_company_data"
hubspot_engagement_contact_identifier: "engagement_contact_data"
hubspot_engagement_deal_identifier: "engagement_deal_data"
hubspot_engagement_email_identifier: "engagement_email_data"
hubspot_engagement_meeting_identifier: "engagement_meeting_data"
hubspot_engagement_note_identifier: "engagement_note_data"
hubspot_engagement_task_identifier: "engagement_task_data"
hubspot_owner_identifier: "owner_data"
hubspot_property_identifier: "property_data"
hubspot_property_option_identifier: "property_option_data"
hubspot_ticket_company_identifier: "ticket_company_data"
hubspot_ticket_contact_identifier: "ticket_contact_data"
hubspot_ticket_deal_identifier: "ticket_deal_data"
hubspot_ticket_engagement_identifier: "ticket_engagement_data"
hubspot_ticket_pipeline_identifier: "ticket_pipeline_data"
hubspot_ticket_pipeline_stage_identifier: "ticket_pipeline_stage_data"
hubspot_ticket_property_history_identifier: "ticket_property_history_data"
hubspot_ticket_identifier: "ticket_data"
hubspot_contact_list_identifier: "contact_list_data"
hubspot_email_event_sent_identifier: "email_event_sent_data"
hubspot_email_event_dropped_identifier: "email_event_dropped_data"
hubspot_merged_deal_identifier: "merged_deal_data"
hubspot_schema: hubspot_integration_tests_56
hubspot_service_enabled: true
hubspot_sales_enabled: true # enable when generating docs
hubspot_marketing_enabled: true # enable when generating docs
hubspot_contact_merge_audit_enabled: true # enable when generating docs
hubspot_using_all_email_events: true # enable when generating docs
hubspot_merged_deal_enabled: true # enable when generating docs
hubspot_email_event_enabled: true
hubspot_contact_list_member_enabled: true
hubspot_contact_enabled: true
hubspot_email_event_sent_enabled: true
hubspot_company_property_history_identifier: "company_property_history_data"
hubspot_company_identifier: "company_data"
hubspot_contact_identifier: "contact_data"
hubspot_contact_merge_audit_identifier: "contact_merge_audit_data"
hubspot_contact_list_member_identifier: "contact_list_member_data"
hubspot_contact_property_history_identifier: "contact_property_history_data"
hubspot_deal_identifier: "deal_data"
hubspot_deal_stage_identifier: "deal_stage_data"
hubspot_deal_company_identifier: "deal_company_data"
hubspot_deal_contact_identifier: "deal_contact_data"
hubspot_deal_pipeline_identifier: "deal_pipeline_data"
hubspot_deal_pipeline_stage_identifier: "deal_pipeline_stage_data"
hubspot_deal_property_history_identifier: "deal_property_history_data"
hubspot_email_campaign_identifier: "email_campaign_data"
hubspot_email_event_identifier: "email_event_data"
hubspot_email_event_bounce_identifier: "email_event_bounce_data"
hubspot_email_event_click_identifier: "email_event_click_data"
hubspot_email_event_deferred_identifier: "email_event_deferred_data"
hubspot_email_event_delivered_identifier: "email_event_delivered_data"
hubspot_email_event_forward_identifier: "email_event_forward_data"
hubspot_email_event_open_identifier: "email_event_open_data"
hubspot_email_event_print_identifier: "email_event_print_data"
hubspot_email_event_spam_report_identifier: "email_event_spam_report_data"
hubspot_email_event_status_change_identifier: "email_event_status_change_data"
hubspot_engagement_identifier: "engagement_data"
hubspot_engagement_call_identifier: "engagement_call_data"
hubspot_engagement_company_identifier: "engagement_company_data"
hubspot_engagement_contact_identifier: "engagement_contact_data"
hubspot_engagement_deal_identifier: "engagement_deal_data"
hubspot_engagement_email_identifier: "engagement_email_data"
hubspot_engagement_meeting_identifier: "engagement_meeting_data"
hubspot_engagement_note_identifier: "engagement_note_data"
hubspot_engagement_task_identifier: "engagement_task_data"
hubspot_owner_identifier: "owner_data"
hubspot_property_identifier: "property_data"
hubspot_property_option_identifier: "property_option_data"
hubspot_ticket_company_identifier: "ticket_company_data"
hubspot_ticket_contact_identifier: "ticket_contact_data"
hubspot_ticket_deal_identifier: "ticket_deal_data"
hubspot_ticket_engagement_identifier: "ticket_engagement_data"
hubspot_ticket_pipeline_identifier: "ticket_pipeline_data"
hubspot_ticket_pipeline_stage_identifier: "ticket_pipeline_stage_data"
hubspot_ticket_property_history_identifier: "ticket_property_history_data"
hubspot_ticket_identifier: "ticket_data"
hubspot_contact_list_identifier: "contact_list_data"
hubspot_email_event_sent_identifier: "email_event_sent_data"
hubspot_email_event_dropped_identifier: "email_event_dropped_data"
hubspot_merged_deal_identifier: "merged_deal_data"

seeds:
hubspot_integration_tests:
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ dbt-bigquery>=1.3.0,<2.0.0
dbt-redshift>=1.3.0,<2.0.0
dbt-postgres>=1.3.0,<2.0.0
dbt-spark>=1.3.0,<2.0.0
dbt-spark[PyHive]>=1.3.0,<2.0.0
dbt-spark[PyHive]>=1.3.0,<1.8.0
dbt-databricks>=1.3.0,<2.0.0
5 changes: 2 additions & 3 deletions models/marketing/hubspot__contact_lists.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_contact_list_member_enabled','hubspot_contact_enabled','hubspot_email_event_sent_enabled'])) }}
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_contact_list_enabled'])) }}

with contact_lists as (

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

{% if fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_contact_enabled','hubspot_email_event_sent_enabled']) %}
{% if fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_contact_enabled','hubspot_contact_list_member_enabled','hubspot_email_event_sent_enabled']) %}

), email_metrics as (

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{ log(fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_member_enabled'])) }}

{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_contact_list_member_enabled','hubspot_contact_enabled','hubspot_email_event_sent_enabled']), materialized='table') }}

with email_sends as (
Expand Down

0 comments on commit 8d35ba0

Please sign in to comment.