-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
Is this a new bug in dbt-core?
- I believe this is a new bug in dbt-core
- I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
When running models with table materialisation, this error will come up irregularly:
relation "<model>__dbt_tmp" already exists
I have already tried using a pre hook to drop the tmp tables if they exist but it does not work.
Expected Behavior
Model to just run
Steps To Reproduce
- dbt project possible relevant config:
models:
data_transformations:
+on_schema_change: "sync_all_columns"
+bind: false
+incremental_strategy: "merge"
staging:
+materialized: view
+schema: staging
Relevant log output
12:10:38 2 of 20 ERROR creating sql incremental model dbt_tobias.stg_ios__identities .... [ERROR in 43.83s]
12:11:04 Database Error in model stg_ios__identities (models/staging/ios/stg_ios__identities.sql)
relation "stg_ios__identities__dbt_tmp" already exists
compiled code at target/run/data_transformations/models/staging/ios/stg_ios__identities.sqlEnvironment
- OS: macOS Tahoe 26.1
- Python: 3.11.11
- dbt-core: 1.9.10
- dbt-redshift: 1.9.5Which database adapter are you using with dbt?
redshift
Additional Context
No response