Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Unreleased

**Full Changelog**: https://github.com/dbt-labs/dbt-utils/compare/1.2.0...main
# dbt utils v1.4.0
**Full Changelog**: https://github.com/dbt-labs/dbt-utils/compare/1.4.0...main
* 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

# dbt utils v1.2.0
**Full Changelog**: https://github.com/dbt-labs/dbt-utils/compare/1.2.0...main

## What's Changed

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