diff --git a/src/databricks/sqlalchemy/_ddl.py b/src/databricks/sqlalchemy/_ddl.py index 667d46da..d5d0bf87 100644 --- a/src/databricks/sqlalchemy/_ddl.py +++ b/src/databricks/sqlalchemy/_ddl.py @@ -16,13 +16,15 @@ def __init__(self, dialect): class DatabricksDDLCompiler(compiler.DDLCompiler): def post_create_table(self, table): - post = " USING DELTA" + post = [" USING DELTA"] if table.comment: comment = self.sql_compiler.render_literal_value( table.comment, sqltypes.String() ) - post += " COMMENT " + comment - return post + post.append("COMMENT " + comment) + + post.append("TBLPROPERTIES('delta.feature.allowColumnDefaults' = 'enabled')") + return "\n".join(post) def visit_unique_constraint(self, constraint, **kw): logger.warning("Databricks does not support unique constraints")