Skip to content

Fix/snowflake iceberg clone dialect error#5722

Open
sineline wants to merge 3 commits intoSQLMesh:mainfrom
sineline:fix/snowflake-iceberg-clone-dialect-error
Open

Fix/snowflake iceberg clone dialect error#5722
sineline wants to merge 3 commits intoSQLMesh:mainfrom
sineline:fix/snowflake-iceberg-clone-dialect-error

Conversation

@sineline
Copy link

@sineline sineline commented Mar 8, 2026

This pull request introduces enhancements to support Iceberg table operations in Snowflake, ensuring correct DDL syntax and behavior for table creation, cloning, and schema alterations. The changes primarily address the unique requirements of Iceberg tables, such as proper handling of PARTITION BY clauses and the use of ICEBERG TABLE syntax in relevant commands. Additionally, the pull request propagates table format information throughout the snapshot evaluation and migration processes.

Snowflake Iceberg Table Support:

  • Added custom DDL logic in _create_table to correctly inject PARTITION BY clauses for Iceberg tables, ensuring compliance with Snowflake's ordering requirements and handling CTAS limitations.
  • Updated clone_table to use CREATE ICEBERG TABLE ... CLONE syntax when cloning Iceberg tables, by passing table_kind based on the table format.
  • Implemented a Snowflake-specific alter_table method that uses ALTER ICEBERG TABLE instead of ALTER TABLE for schema changes on Iceberg tables.

Propagation of Table Format:

  • Modified snapshot evaluator logic to pass table_format during snapshot cloning and table migration, enabling downstream methods to select the correct DDL syntax. [1] [2]

Base Adapter Improvements:

  • Updated clone_table and alter_table signatures in the base engine adapter to accept and propagate table_kind and table_format parameters, allowing engine-specific logic to be triggered as needed. [1] [2]

@CLAassistant
Copy link

CLAassistant commented Mar 8, 2026

CLA assistant check
All committers have signed the CLA.

@sineline sineline force-pushed the fix/snowflake-iceberg-clone-dialect-error branch 3 times, most recently from 60d0b1a to 429eee9 Compare March 9, 2026 12:23
…ith PARTITION BY to correctly handle property ordering and CTAS limitations.
@sineline sineline force-pushed the fix/snowflake-iceberg-clone-dialect-error branch from 429eee9 to 9c0c155 Compare March 9, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants