You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
dynamic tables are tables causing the following check to fail:
{%- set existing_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}
{% if existing_relation is not none and not existing_relation.is_table %}
{{ log("Dropping relation " ~ existing_relation ~ " because it is of type " ~ existing_relation.type, True) }}
{{ drop_relation_if_exists(existing_relation) }}
{% else %}
{{ log("Keeping relation " ~ existing_relation ~ " because it is of type " ~ existing_relation.type, True) }}
{% endif %}
doesn't drop then issues the standard create or replace table as ...
This prints the message Keeping relation "DEV_mydatabase"."raw"."mytable" because it is of type table
then fails with SQL compilation error: Object 'mytable' already exists as DYNAMIC_TABLE
Expected Behavior
because snowflake considers table and dynamic table to be different object types (as per the error message, grant allocations, and assorted other different capabilities) that "is table" would be 'false' for a dynamic table.
Steps To Reproduce
create a dynamic table create dynamic test_table as select 1
setup a dbt model for 'test_table' to use the snoflake table materialiser for this table, instead of a dynamic table/
Is this a new bug in dbt-snowflake?
Current Behavior
dynamic tables are tables causing the following check to fail:
doesn't drop then issues the standard
create or replace table as ...
This prints the message
Keeping relation "DEV_mydatabase"."raw"."mytable" because it is of type table
then fails with
SQL compilation error: Object 'mytable' already exists as DYNAMIC_TABLE
Expected Behavior
because snowflake considers table and dynamic table to be different object types (as per the error message, grant allocations, and assorted other different capabilities) that "is table" would be 'false' for a dynamic table.
Steps To Reproduce
create dynamic test_table as select 1
Relevant log output
No response
Environment
Additional Context
although the above fragment is my code, dbt-snowflake has the same check:
dbt-snowflake/dbt/include/snowflake/macros/materializations/table.sql
Line 19 in 87a6e80
The text was updated successfully, but these errors were encountered: