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
33 changes: 7 additions & 26 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,20 @@
**Please provide your name and company**
Resolves #
<!--- Add your issue # above. If an issue was not created, please create one so our team can review your submission. -->

**Link the issue/feature request which this PR is meant to address**
<!--- If an issue was not created, please create one first so we may discuss the PR prior to opening one. -->
### Please provide your name and company

**Detail what changes this PR introduces and how this addresses the issue/feature request linked above.**

**How did you validate the changes introduced within this PR?**
### Describe what this PR changes and how it addresses the linked issue or feature request.

**Which warehouse did you use to develop these changes?**

**Did you update the CHANGELOG?**
<!--- Please update the new package version’s CHANGELOG entry detailing the changes included in this PR. -->
<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). -->
- [ ] Yes
### How did you validate the changes introduced within this PR, and what warehouse did you use for testing?

**Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)**
<!--- The dbt_project.yml and the integration_tests/dbt_project.yml files contain the version number. Be sure to upgrade it accordingly -->
<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). -->
- [ ] Yes

**Typically there are additional maintenance changes required before this will be ready for an upcoming release. Are you comfortable with the Fivetran team making a few commits directly to your branch?**
<!--- If you select Yes this will help expedite your PR in case there are small changes required before approval. We encourage you not to use this branch in a production environment as we may make additional updates. -->
<!--- If you select No, we will not make any changes directly to your branch and will either communicate any planned changes via the PR thread or will merge your PR into a separate branch so we may make changes without modifying your branch.. -->
- [ ] Yes
- [ ] No

**If you had to summarize this PR in an emoji, which would it be?**
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
:dancer:

**Feedback**

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next.

**PR Template**
- [Community Pull Request Template](?expand=1&template=pull_request_template.md) (default)
**PR Template**

- [Community Pull Request Template](?expand=1&template=pull_request_template.md) (default)
- [Maintainer Pull Request Template](?expand=1&template=maintainer_pull_request_template.md) (to be used by maintainers)
10 changes: 10 additions & 0 deletions .github/workflows/check-docs-current.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Check docs current

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
check-docs:
uses: fivetran/dbt_package_automations/.github/workflows/check-docs-current.yml@main
secrets: inherit
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# dbt_iterable v1.5.1

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

## Feature Updates
- Adds DuckDB as a supported destination.


# dbt_iterable v1.5.0

[PR #81](https://github.com/fivetran/dbt_iterable/pull/81) includes the following updates:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ By default, this package materializes the following final tables:
To use this dbt package, you must have the following:

- At least one Fivetran Iterable connection syncing data into your destination.
- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, or **Databricks** destination.
- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, **Databricks**, or **DuckDB** destination.

#### Unsubscribe tables are no longer history tables

Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'iterable'

version: '1.5.0'
version: '1.5.1'
config-version: 2
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.

1 change: 1 addition & 0 deletions integration_tests/ci/test_scenarios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ schema_variable_name: "iterable_schema"

include_databricks_sql: false
include_sqlserver: false
include_duckdb: true
include_dbt_compile: true

test_scenarios:
Expand Down
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: 'iterable_integration_tests'
version: '1.5.0'
version: '1.5.1'
profile: 'integration_tests'
vars:
iterable:
Expand Down
3 changes: 2 additions & 1 deletion integration_tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ 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-databricks>=1.6.0,<2.0.0
dbt-databricks>=1.3.0,<2.0.0
dbt-duckdb>=1.3.0,<2.0.0
certifi==2025.1.31
7 changes: 6 additions & 1 deletion models/intermediate/int_iterable__list_user_unnest.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
materialized='incremental',
unique_key='unique_key',
incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',
partition_by={"field": "date_day", "data_type": "date"} if target.type not in ('spark','databricks') else ['date_day'],
partition_by={"field": "date_day", "data_type": "date"} if target.type not in ('spark', 'databricks', 'duckdb') else ['date_day'],
file_format='delta',
on_schema_change='fail'
)
Expand Down Expand Up @@ -114,6 +114,11 @@ with user_history as (
lateral explode_outer(from_json(
case when email_list_ids = '[]' then '["is_null"]' {# to not remove empty array-rows #}
else email_list_ids end, 'array<string>')) as email_list_id
{% elif target.type == 'duckdb' %}
cross join
unnest(from_json(cast((
case when email_list_ids = '[]' then '["is_null"]' {# to not remove empty array-rows #}
else email_list_ids end) as varchar), '["VARCHAR"]')) as t(email_list_id)
{% else %} {# target is postgres #}
cross join
json_array_elements_text(cast((
Expand Down
2 changes: 1 addition & 1 deletion models/iterable__events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
materialized='incremental',
unique_key=['unique_event_id'],
incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',
partition_by={"field": "created_on", "data_type": "date"} if target.type not in ('spark','databricks') else ['created_on'],
partition_by={"field": "created_on", "data_type": "date"} if target.type not in ('spark', 'databricks', 'duckdb') else ['created_on'],
file_format='delta',
on_schema_change='fail'
)
Expand Down
Loading