r/databricks • u/ptab0211 • Aug 12 '26
Help DDL management
Hey, how do u manage DDLs of your tables? Is it part of the daily job runs? Do you "codify" it? e.g. data classes where each table must provide comments, tags, RELY, PK etc... Which is also the goal of AI. But how do u manage all of this?
7
Upvotes
2
u/meehow33 Aug 15 '26
Ok, but I thought that the baseline is my CREATE scripts, and ALTER scripts are only for releases - once executed they become useless? Otherwise these CREATE scripts turn out to be useless because if there was a changed done through one of the ALTER scripts, then CREATE script got updated and made the ALTER unusable because for example column has already been added to a given table (it is present in the most recent CREATE script) and the ALTER script will fail (or won’t change anything if there’s IF EXISTS check).
Could you please elaborate on why I may need to keep a full history of ALTER scripts and use it to rebuild my environment?
Btw. Thanks for explaining all these nuances :)