From 79ee5d1fb57ff6e5f41db7e30e491e04aa4fa831 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Thu, 3 Mar 2022 09:00:01 +1300 Subject: [PATCH] Fix union_relations error when no include/exclude provided --- macros/sql/union.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/sql/union.sql b/macros/sql/union.sql index 009a765a..a7bf1d95 100644 --- a/macros/sql/union.sql +++ b/macros/sql/union.sql @@ -61,7 +61,7 @@ {%- set ordered_column_names = column_superset.keys() -%} - {%- if not column_superset.keys() -%} + {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %} {%- set relations_string -%} {%- for relation in relations -%} {{ relation.name }}