Skip to content

Commit a77aebf

Browse files
authored
fix: source_column_name none (#661)
* fix: source_column_name none source_column_name need a [none test](https://stackoverflow.com/questions/19614027/jinja2-template-variable-if-none-object-set-a-default-value) not "!=" * Update CHANGELOG.md
1 parent cd56410 commit a77aebf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ After:
7272
- 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))
7373

7474
## Fixes
75+
- Fix `union_relations` `source_column_name` none option.
7576
- 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))
7677

7778
## Quality of life

macros/sql/union.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
(
8686
select
8787

88-
{%- if source_column_name != none %}
88+
{%- if source_column_name is not none %}
8989
cast({{ dbt_utils.string_literal(relation) }} as {{ type_string() }}) as {{ source_column_name }},
9090
{%- endif %}
9191

0 commit comments

Comments
 (0)