diff --git a/CHANGELOG.md b/CHANGELOG.md index c6cf070a..cbcb51cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ After: - Add Snowflake specific implementation of `deduplicate()` ([#543](https://github.com/dbt-labs/dbt-utils/issues/543), [#548](https://github.com/dbt-labs/dbt-utils/pull/548)) ## Fixes +- Fix `union_relations` `source_column_name` none option. - Enable a negative part_number for `split_part()` ([#557](https://github.com/dbt-labs/dbt-utils/issues/557), [#559](https://github.com/dbt-labs/dbt-utils/pull/559)) ## Quality of life diff --git a/macros/sql/union.sql b/macros/sql/union.sql index 13abd30d..e9a249a5 100644 --- a/macros/sql/union.sql +++ b/macros/sql/union.sql @@ -85,7 +85,7 @@ ( select - {%- if source_column_name != none %} + {%- if source_column_name is not none %} cast({{ dbt_utils.string_literal(relation) }} as {{ type_string() }}) as {{ source_column_name }}, {%- endif %}