Skip to content

Commit

Permalink
Merge branch 'main' into snowflake_ignore_case
Browse files Browse the repository at this point in the history
  • Loading branch information
dataders authored Oct 25, 2024
2 parents 093f967 + b95d4e3 commit 59d3174
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion macros/common/stage_external_sources.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{% do sources_to_stage.append(node) %}
{% endif %}
{% else %}
{% if src == node.source_name %}
{% if src == node.name %}
{% do sources_to_stage.append(node) %}
{% endif %}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions macros/plugins/snowflake/create_external_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
{{column.expression}}
{%- else -%}
{%- if ignore_case -%}
{%- set col_id = 'value:c' ~ loop.index if is_csv else 'GET_IGNORE_CASE($1, ' ~ "'"~ column_alias ~"'"~ ')' -%}
{%- set col_id = 'value:c' ~ loop.index if is_csv else 'GET_IGNORE_CASE($1, ' ~ "'"~ column_quoted ~"'"~ ')' -%}
{%- else -%}
{%- set col_id = 'value:c' ~ loop.index if is_csv else 'value:' ~ column_alias -%}
{%- set col_id = 'value:c' ~ loop.index if is_csv else 'value:' ~ column_quoted -%}
{%- endif -%}
(case when is_null_value({{col_id}}) or lower({{col_id}}) = 'null' then null else {{col_id}} end)
{%- endif -%}
Expand Down

0 comments on commit 59d3174

Please sign in to comment.