Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# dbt_mailchimp v1.3.1

[PR #67](https://github.com/fivetran/dbt_mailchimp/pull/67) includes the following updates:

## Bug Fix
- Resolves a BigQuery error when the `segment`, `campaign`, and `automation` sources supply mismatched datatypes by casting the `segment_id` join keys in `mailchimp__segments` to string.

# dbt_mailchimp v1.3.0

[PR #64](https://github.com/fivetran/dbt_mailchimp/pull/64) includes the following updates:
Expand Down Expand Up @@ -237,4 +244,4 @@ If you are using dbt Core < 1.9.6 and want to continue running Mailchimp freshne
- Updated variable 'segment' to 'mailchimp_segment' to differentiate between similar variable in dbt-lab's Segment package (refer to [this feature request](https://github.com/fivetran/dbt_mailchimp/issues/20])

## Under the Hood
- Added Postgres compatability
- Added Postgres compatability
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'mailchimp'
version: '1.3.0'
version: '1.3.1'
require-dbt-version: [">=1.3.0", "<3.0.0"]

models:
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 integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'mailchimp_integration_tests'
version: '1.3.0'
version: '1.3.1'
profile: 'integration_tests'

models:
Expand Down
6 changes: 4 additions & 2 deletions models/mailchimp__segments.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ with segments as (
{% endif %}
from segments
left join campaign_activities
on segments.segment_id = campaign_activities.segment_id
on cast(segments.segment_id as {{ dbt.type_string() }})
= cast(campaign_activities.segment_id as {{ dbt.type_string() }})
and segments.source_relation = campaign_activities.source_relation
left join lists
on segments.list_id = lists.list_id
Expand Down Expand Up @@ -59,7 +60,8 @@ with segments as (
{% endif %}
from metrics
left join automation_activities
on metrics.segment_id = automation_activities.segment_id
on cast(metrics.segment_id as {{ dbt.type_string() }})
= cast(automation_activities.segment_id as {{ dbt.type_string() }})
and metrics.source_relation = automation_activities.source_relation

)
Expand Down