Skip to content

Commit

Permalink
Merge pull request #240 from SDGGroup/fix/snowflake-delta-format
Browse files Browse the repository at this point in the history
snowflake delta format
  • Loading branch information
dataders authored Apr 10, 2024
2 parents e5359d8 + da1a3cc commit 58fc3ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions macros/plugins/snowflake/create_external_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
{% if external.auto_refresh in (true, false) -%}
auto_refresh = {{external.auto_refresh}}
{%- endif %}
{% if external.table_format | lower == "delta" %}
refresh_on_create = false
{% endif %}
{% if external.pattern -%} pattern = '{{external.pattern}}' {%- endif %}
{% if external.integration -%} integration = '{{external.integration}}' {%- endif %}
file_format = {{external.file_format}}
Expand Down
3 changes: 2 additions & 1 deletion macros/plugins/snowflake/refresh_external_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

{% set auto_refresh = external.get('auto_refresh', false) %}
{% set partitions = external.get('partitions', none) %}
{% set delta_format = (external.table_format | lower == "delta") %}

{% set manual_refresh = (partitions and not auto_refresh) %}
{% set manual_refresh = not auto_refresh %}

{% if manual_refresh %}

Expand Down

0 comments on commit 58fc3ce

Please sign in to comment.