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
-- get the standard backup name
-- drop any pre-existing backup
drop table if exists "DBT_TEST_DB"."SCHEMA_XYZ"."TESTTABLE__dbt_backup" cascade
;
alter table "DBT_TEST_DB"."SCHEMA_XYZ"."TESTTABLE" rename to TESTTABLE__dbt_backup;
create dynamic table DBT_TEST_DB.SCHEMA_XYZ.TESTTABLE
target_lag = '15 minutes'
warehouse = WH_PRJAPAN_LOAD
as (
select
a1
from prod_db.sch_xyz.TESTTABLE
)
;
-- get the standard backup name
drop table if exists "DBT_TEST_DB"."SCHEMA_XYZ"."TESTTABLE__dbt_backup" cascade
Also I realized that there where TESTTABLE__dbt_backup table produced in PUBLIC schema of DBT_TEST_DB.
And I think drop query is pointing at SCHEMA_XYZ's TESTTABLE__dbt_backup table. So maybe the cause is, full refresh logic is making backup table in wrong schema, and it's causing misalignment with drop query.
Is this a new bug in dbt-snowflake?
Current Behavior
When I tried to full-refresh dynamic more than two times, got error
model file:
file name: schema_xyz__testtable.sql
dbt's generated run query:
Also I realized that there where TESTTABLE__dbt_backup table produced in PUBLIC schema of DBT_TEST_DB.
And I think drop query is pointing at SCHEMA_XYZ's TESTTABLE__dbt_backup table. So maybe the cause is, full refresh logic is making backup table in wrong schema, and it's causing misalignment with drop query.
Expected Behavior
Able to do full refresh of dynamic table.
Steps To Reproduce
dependency:
$ pip freeze | grep dbt
dbt-core==1.7.14
dbt-extractor==0.5.1
dbt-semantic-interfaces==0.4.4
dbt-snowflake==1.7.3
sqlfluff-templater-dbt==3.0.0
Relevant log output
No response
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: