Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt_utils.star: Remove trailing whitespace in the comment when no column is returned #960

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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