- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I have a Delta Live Tables (DLT) pipeline that creates a streaming table (e.g., dbrtdflite_catalog.demotest_silver.customer_profile).
I want to update table-level and column-level comments as well as constraints on this table.
When I try commands like:
COMMENT ON TABLE dbrtdflite_catalog.demotest_silver.customer_profile IS 'Customer profile data';
I get an error:
[STREAMING_TABLE_OPERATION_NOT_ALLOWED.INVALID_ALTER] The operation COMMENT ON TABLE is not allowed: To alter the schema or properties of Streaming Tables, please use the CREATE OR REFRESH command.
Even I have tried updating constraints but seems it's not allowed.
My requirement is to update comments/constraints outside of the DLT pipeline (without modifying the pipeline code).
- Is there any supported way to do this for DLT-managed streaming tables?
- Or is the only option to make these changes inside the DLT pipeline definition itself?
Thanks in advance for your help!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hi @Nexusss7
You can add a comment in the delta live tables, either the MV or the streaming table, in the tag -
@Dlt.table()
@Dlt.table(
comment = "Delta live tables comment"
)
Here is the syntax for SQL: https://docs.databricks.com/aws/en/dlt-ref/dlt-sql-ref-create-materialized-view#syntax
Here is the syntax for Python: https://docs.databricks.com/aws/en/dlt-ref/dlt-python-ref-table#syntax
It is not currently supported to update comments or constraints for Delta Live Tables (DLT)-managed streaming tables outside the pipeline definition code. Any attempt to use standard SQL commands (COMMENT ON TABLE
, ALTER TABLE ADD CONSTRAINT
, etc.) on DLT streaming tables results in errors, as Databricks restricts altering DLT streaming tables this way for metadata integrity and pipeline management reasons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hi @Nexusss7
You can add a comment in the delta live tables, either the MV or the streaming table, in the tag -
@Dlt.table()
@Dlt.table(
comment = "Delta live tables comment"
)
Here is the syntax for SQL: https://docs.databricks.com/aws/en/dlt-ref/dlt-sql-ref-create-materialized-view#syntax
Here is the syntax for Python: https://docs.databricks.com/aws/en/dlt-ref/dlt-python-ref-table#syntax
It is not currently supported to update comments or constraints for Delta Live Tables (DLT)-managed streaming tables outside the pipeline definition code. Any attempt to use standard SQL commands (COMMENT ON TABLE
, ALTER TABLE ADD CONSTRAINT
, etc.) on DLT streaming tables results in errors, as Databricks restricts altering DLT streaming tables this way for metadata integrity and pipeline management reasons.

