Skip to content

Commit 4457e42

Browse files
authored
Remove extra semicolon in insert_by_period materialization (#439)
* Remove extra semicolon in `insert_by_period` materialization. `create_table_as()` generates a SQL statement that already ends with a semicolon, so the extra semicolon after a `create_table_as()` call in the `insert_by_period` materialization ends up being an empty SQL statement, and at least when using Snowflake this causes the dbt run to fail with a "cannot unpack non-iterable NoneType object" error. * Update changelog for PR 439.
1 parent c2f228f commit 4457e42

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ This is a compatibility release in preparation for `dbt-core` v1.0.0 (🎉). Whe
99
- Bump `require-dbt-version` to have an upper bound of `'<=1.0.0'`.
1010
- Url link fixes within the README for `not_constant`, `dateadd`, `datediff` and updated the header `Logger` to `Jinja Helpers`. ([#431](https://github.com/dbt-labs/dbt-utils/pull/431))
1111
- Fully qualified a `cte_name.*` in the `equality` test to avoid an Exasol error ([#420](https://github.com/dbt-labs/dbt-utils/pull/420))
12+
- Remove extra semicolon in `insert_by_period` materialization that was causing errors ([#439](https://github.com/dbt-labs/dbt-utils/pull/439))
1213

1314
## Contributors:
1415
- [joemarkiewicz](https://github.com/fivetran-joemarkiewicz)
1516
- [TimoKruth](https://github.com/TimoKruth)
17+
- [sean-rose](https://github.com/sean-rose)
1618

1719
# dbt-utils v0.7.3
1820

macros/materializations/insert_by_period_materialization.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
{# Create an empty target table -#}
103103
{% call statement('main') -%}
104104
{%- set empty_sql = sql | replace("__PERIOD_FILTER__", 'false') -%}
105-
{{create_table_as(False, target_relation, empty_sql)}};
105+
{{create_table_as(False, target_relation, empty_sql)}}
106106
{%- endcall %}
107107
{%- endif %}
108108

0 commit comments

Comments
 (0)