Skip to content
Open
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
18 changes: 9 additions & 9 deletions macros/sql/star.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
{% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}

{%- if cols|length <= 0 -%}
{% if flags.WHICH == 'compile' %}
{% set response %}
{%- if flags.WHICH == 'compile' -%}
{%- set response -%}
*
/* No columns were returned. Maybe the relation doesn't exist yet
or all columns were excluded. This star is only output during
/* No columns were returned. Maybe the relation doesn't exist yet
or all columns were excluded. This star is only output during
dbt compile, and exists to keep SQLFluff happy. */
{% endset %}
{% do return(response) %}
{% else %}
{% do return("/* no columns returned from star() macro */") %}
{% endif %}
{%- endset -%}
{%- do return(response) -%}
{%- else -%}
{%- do return("/* no columns returned from star() macro */") -%}
{%- endif -%}
{%- else -%}
{%- for col in cols %}
{%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}
Expand Down