Skip to content

Commit

Permalink
Merge pull request #4 from svinstech/fix_trailing_comma
Browse files Browse the repository at this point in the history
fix trailing comma when no columns to pivot
  • Loading branch information
jennaallen authored Mar 24, 2023
2 parents cd863ee + 13b8802 commit 2df8f4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion macros/object_pivot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

select
{%- for ic in include_columns %}
{{ ic }},
{{ ic }}{%- if not loop.last -%},{%- endif -%}
{%- if keys|length > 0 -%},{%- endif -%}
{%- endfor -%}
{%- for k in keys -%}
{%- set alias_key = alias_keys[loop.index0] -%}
Expand Down

0 comments on commit 2df8f4e

Please sign in to comment.