Skip to content

Commit

Permalink
Added quotes to column name (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
aPeterHeise authored Feb 28, 2022
1 parent 4ea5203 commit 5f29f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/plugins/snowflake/create_external_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{%- for column in columns %}
{%- set column_quoted = adapter.quote(column.name) if column.quote else column.name %}
{%- set col_expression -%}
{%- set col_id = 'value:c' ~ loop.index if is_csv else 'value:' ~ column.name -%}
{%- set col_id = 'value:c' ~ loop.index if is_csv else 'value:' ~ column_quoted -%}
(case when is_null_value({{col_id}}) or lower({{col_id}}) = 'null' then null else {{col_id}} end)
{%- endset %}
{{column_quoted}} {{column.data_type}} as ({{col_expression}}::{{column.data_type}})
Expand Down

0 comments on commit 5f29f01

Please sign in to comment.