diff --git a/macros/sql/union.sql b/macros/sql/union.sql index ac289e2f..d653179d 100644 --- a/macros/sql/union.sql +++ b/macros/sql/union.sql @@ -114,7 +114,10 @@ from {{ relation }} - {% if where -%} + {% if where is callable -%} + {# Allows possibility of customizing where clause by relation, eg. in incremental runs. #} + {{ where(relation) }} + {% elif where -%} where {{ where }} {%- endif %} )