Can we add a column comments for a materialized view on Azure Databricks?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2026 07:26 PM - edited 01-29-2026 07:34 PM
I want to understand whether it’s possible to add or update column comments on an existing materialized view in Azure Databricks, and if so, what command should be used—especially when updating comments for multiple columns at once.
Here’s my situation:
- The materialized view already exists.
- It has around 50 columns in total.
- About 23 columns inherited their comments automatically because they were selected directly from a base table that already had column comments.
- Another 21 columns come from a different table that did not have column comments, so those comments are missing.
- The remaining 6 columns are derived/calculated columns defined directly in the materialized view, and naturally they have no comments either.
I want to populate column comments for all missing columns, regardless of whether they come from another table or are computed in the materialized view itself.
The materialized view was created using something like:
CREATE OR REPLACE MATERIALIZED VIEW mv_name
COMMENT 'view comment'
AS
SELECT * FROM table;