Skip to content

Commit

Permalink
use column name in group by in get_column_values (dbt-labs#407)
Browse files Browse the repository at this point in the history
Most database engines (e.g. all SQL Server versions) don't support grouping by the position of the column.
  • Loading branch information
sdebruyn authored Sep 15, 2021
1 parent 869a6c9 commit fc18046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/sql/get_column_values.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{{ column }} as value

from {{ target_relation }}
group by 1
group by {{ column }}
order by {{ order_by }}

{% if max_records is not none %}
Expand Down

0 comments on commit fc18046

Please sign in to comment.