Schema evolution on table #102
-
Hi, me again, Curious what you think about the ENABLE_SCHEMA_EVOLUTION option on TABLES? We are interested in using SnowDDL for managing our ingestion tables, for which we'd probably like to allow the ingestion pipeline to evolve the schema automatically. I guess to support this, SnowDDL would have to allow the table configuration not to specify columns explicitly, or possibly to ignore changes to the underlying table? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In my view, it is a harmful option, which should not have been released in its current state. I'll explain:
What we can do instead in regards to SnowDDL: (1) Use VARIANT (2) Use is_sandbox flag and create / evolve table in pipeline code You will be able to control every aspect of it, including types conversion, comments, any other extra options. You may skip loading some columns and pad other columns with default values. (3) Use dynamic TableBlueprint and generate it in Python You will get all the schema evolution features from SnowDDL, which supports everything, including column type changes and column order changes. And you will be able to adapt and adjust your ETL pipelines and downstream views / assets accordingly. Raw data tables do not exist in the vacuum. Even if new column was "added" by some external force, you still need to take it into account in your transformations and in reporting layer. I may consider adding this option if Snowflake makes this feature more robust and worthwhile. Until then it seems more like a gimmick or a "silver bullet" which might help sales, but creates a lot of issues down the road. |
Beta Was this translation helpful? Give feedback.
In my view, it is a harmful option, which should not have been released in its current state.
I'll explain:
destroy
andapply
config again with env_prefix.…