Skip to content

Commit

Permalink
iceberg as config
Browse files Browse the repository at this point in the history
  • Loading branch information
dataders committed Mar 28, 2024
1 parent e2425d1 commit 312f7c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dbt/include/snowflake/macros/materializations/table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

{#-- Drop the relation if it was a view to "convert" it in a table. This may lead to
-- downtime, but it should be a relatively infrequent occurrence #}
{% if old_relation is not none and not old_relation.is_table %}
{% if old_relation is not none %}
{{ log("Dropping relation " ~ old_relation ~ " because it is of type " ~ old_relation.type) }}
{{ drop_relation_if_exists(old_relation) }}
{% endif %}
Expand Down
8 changes: 6 additions & 2 deletions dbt/include/snowflake/macros/relations/table/create.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{% macro snowflake__create_table_as(temporary, relation, compiled_code, language='sql') -%}
{{ log('XXX: am i here?', info=True) }}
{%- set transient = config.get('transient', default=true) -%}
{%- set iceberg = config.get('iceberg', default=true) -%}

{% if temporary -%}
{%- set table_type = "temporary" -%}
{%- elif transient -%}
{%- set table_type = "transient" -%}
{# {%- elif transient -%}
{%- set table_type = "transient" -%} #}
{%- elif iceberg -%}
{%- set table_type = "iceberg" -%}
{%- else -%}
{%- set table_type = "" -%}
{%- endif %}
Expand Down

0 comments on commit 312f7c3

Please sign in to comment.