Fix/snowflake iceberg clone dialect error#5722
Open
sineline wants to merge 3 commits intoSQLMesh:mainfrom
Open
Fix/snowflake iceberg clone dialect error#5722sineline wants to merge 3 commits intoSQLMesh:mainfrom
sineline wants to merge 3 commits intoSQLMesh:mainfrom
Conversation
60d0b1a to
429eee9
Compare
…rmat to the engine adapter.
…able format to the `alter_table` method.
…ith PARTITION BY to correctly handle property ordering and CTAS limitations.
429eee9 to
9c0c155
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 BYclauses and the use ofICEBERG TABLEsyntax in relevant commands. Additionally, the pull request propagates table format information throughout the snapshot evaluation and migration processes.Snowflake Iceberg Table Support:
_create_tableto correctly injectPARTITION BYclauses for Iceberg tables, ensuring compliance with Snowflake's ordering requirements and handling CTAS limitations.clone_tableto useCREATE ICEBERG TABLE ... CLONEsyntax when cloning Iceberg tables, by passingtable_kindbased on the table format.alter_tablemethod that usesALTER ICEBERG TABLEinstead ofALTER TABLEfor schema changes on Iceberg tables.Propagation of Table Format:
table_formatduring snapshot cloning and table migration, enabling downstream methods to select the correct DDL syntax. [1] [2]Base Adapter Improvements:
clone_tableandalter_tablesignatures in the base engine adapter to accept and propagatetable_kindandtable_formatparameters, allowing engine-specific logic to be triggered as needed. [1] [2]