Skip to content

Commit

Permalink
Merge pull request #113 from fivetran/bugfix/datatype-cast
Browse files Browse the repository at this point in the history
explicit casts
  • Loading branch information
fivetran-reneeli authored Jun 28, 2023
2 parents d301c16 + 99640fd commit b36919d
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# dbt_hubspot v0.10.1

## 🪲 Bug Fixes
Explicitly casts join fields (`engagement_id` and `deal_id`) in `hubspot__deals` as the appropriate data types to avoid potential errors in joining. [PR #113](https://github.com/fivetran/dbt_hubspot/pull/113)

# dbt_hubspot v0.10.0
## 🚨 Breaking Changes 🚨
These changes are made breaking due to changes in the source.
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.10.0'
version: '0.10.1'

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.

6 changes: 3 additions & 3 deletions docs/index.html

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_7
schema: hubspot_integration_tests_8
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: hubspot_integration_tests_7
schema: hubspot_integration_tests_8
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_7
schema: hubspot_integration_tests_8
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_7
schema: hubspot_integration_tests_8
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_7
schema: hubspot_integration_tests_8
threads: 8
token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
type: databricks
4 changes: 2 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: 'hubspot_integration_tests'
version: '0.10.0'
version: '0.10.1'

profile: 'integration_tests'
config-version: 2
vars:
hubspot_schema: hubspot_integration_tests_7
hubspot_schema: hubspot_integration_tests_8
hubspot_source:
hubspot_service_enabled: true
hubspot_company_property_history_identifier: "company_property_history_data"
Expand Down
4 changes: 2 additions & 2 deletions models/sales/hubspot__deals.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ with deals_enhanced as (
engagement_deals.deal_id
from engagements
inner join engagement_deals
using (engagement_id)
on cast(engagements.engagement_id as {{ dbt.type_bigint() }}) = cast(engagement_deals.engagement_id as {{ dbt.type_bigint() }} )

), engagement_deal_agg as (

Expand All @@ -39,7 +39,7 @@ with deals_enhanced as (
{% endfor %}
from deals_enhanced
left join engagement_deal_agg
using (deal_id)
on cast(deals_enhanced.deal_id as {{ dbt.type_bigint() }}) = cast(engagement_deal_agg.deal_id as {{ dbt.type_bigint() }} )

)

Expand Down

0 comments on commit b36919d

Please sign in to comment.