dbt-labs / dbt-labs/dbt-adapters

[Bug] Iceberg incremental tmp relations can collide when sharing the same schema

Open
#1,893 1 comment 0 reactions 0 assignees View on GitHub
feature:iceberg pkg:dbt-snowflake triage:product type:bug
Dominant language
Python
Stars
233
Forks
362
Avg merge
3d 22h
Merged PRs (30d)
9

Description

When running incremental models on Iceberg (catalog-linked) tables in Snowflake, the tmp relation is created as a permanent table because temporary tables are not supported in catalog-linked database schemas. Unlike session-scoped temporary tables, permanent tables share the regular schema namespace, so concurrent runs or teams not using schema-based dev isolation will collide on the same `model__dbt_tmp` name.

Users need more granular control over where the tmp relation is created (target schema, database, or naming strategy).

**Relevant code:** `dbt-snowflake/src/dbt/include/snowflake/macros/materializations/incremental.sql`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.