Generate metadata with AI comments

Genie relies on the table and column descriptions in Unity Catalog to interpret questions, so add accurate descriptions before you build a Genie Agent on the tables. Catalog Explorer suggests an AI-generated comment for an object or a column as a first draft. You accept, edit, or discard each suggestion before you save it.

Warning

Saving a comment runs an ALTER SQL command on the object. That can disrupt pipelines and jobs that read it. Check which jobs use the table before you save.

Requirements

You need the following privileges to generate and save a comment. The rules differ for tables and for views:

  • Catalogs, schemas, tables, functions, models, and volumes: You must own the object or have the MODIFY privilege on it.
  • Views and metric views: You must own the object.
  • Viewing comments: Users need the BROWSE privilege on the catalog. BROWSE doesn't require USE CATALOG or USE SCHEMA.

Generate and review comments

Generate a comment for one object, or for every column in a table, and review each suggestion before you save it.

Generate a comment for an object

Use the About this <object> panel to generate a comment for a catalog, schema, table, or other supported object:

  1. Click Data icon. Catalog in the workspace sidebar, then search for or browse to the object and select it.
  2. In the About this <object> panel, click AI generate.
  3. Check the suggestion against the data. Click Accept to keep it as-is, or Edit to change it before you save.

Generate comments for table columns

Generate comments for every column in a table in one step, and then accept or discard each one:

  1. Open the table in Catalog Explorer.
  2. Above the column headings, click AI generate. Catalog Explorer generates a comment for each column.
  3. For each column, click the check mark to accept its comment, or close the comment without saving.

Change the language of a comment

Change the language when you want comments in a language other than your workspace UI language. Azure Databricks uses the selected language for later requests, and the selection persists in your browser. To change the language, do the following:

  1. After you generate a comment, click the Kebab menu icon. kebab menu in the upper-right corner of the AI Suggested Description card.
  2. Click Change default language, and select a language.

Review before you save

AI models aren't always accurate, so review each comment before you save it. Databricks recommends that a person check AI-generated comments for inaccuracies. Don't use the model to classify data, such as to detect columns that contain personally identifiable information (PII).

After you save, the owner or a user with MODIFY can edit the comment, or change it with ALTER or COMMENT ON.

Troubleshooting

These entries cover a missing button, users who can't see comments, and a job that fails after a save.

The AI generate button isn't available

Check whether you own the object, or have MODIFY on it. For views and metric views, only the owner can generate and save a comment.

A user can't see the comments

Users need the BROWSE privilege on the catalog to view comments on objects in it.

A job failed after you saved a comment

Saving a comment runs ALTER on the object. Check the job's error and whether it depends on the table's metadata. Schedule comment changes around pipeline runs when you can.

Next steps

Resource Description
Define sales metrics as a metric view Define the sales metrics as a metric view, with the field and measure names that Genie and dashboards read
Add AI-generated comments to Unity Catalog objects Learn how AI-generated comments work, and read the privacy and security FAQs