Skip to content
Open
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
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Unreleased

**Full Changelog**: https://github.com/dbt-labs/dbt-utils/compare/1.3.0...main
**Full Changelog**: https://github.com/dbt-labs/dbt-utils/compare/1.4.0...main

# dbt utils v1.4.0

* union_relations macro now outputs `*` in compile mode when the upstream relations haven't been built, such as when running SQLFluff on new models

## New Contributors

* @martinshjung made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/832

**Full Changelog**: https://github.com/dbt-labs/dbt-utils/compare/1.3.0...1.4.0

# dbt utils v1.3.0

Expand Down
6 changes: 6 additions & 0 deletions macros/sql/union.sql
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@
cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},
{%- endif %}

/* No columns from any of the relations.
This star is only output during dbt compile, and exists to keep SQLFluff happy. */
{% if dbt_command == 'compile' and ordered_column_names|length == 0 %}
*
{% endif %}

{% for col_name in ordered_column_names -%}

{%- set col = column_superset[col_name] %}
Expand Down
Loading