メインコンテンツまでスキップ

データと AI アセットにコメントを追加する

この記事では、データアセットとAIアセットのコメントと、それらを追加する方法について説明します。 コメントは、あなたや他のユーザーが必要なデータと AI アセットを見つけて管理するのに役立ちます。

コメントは、セキュリティ保護可能なオブジェクトに注釈を付けるためのメタデータ フィールドを提供します。 Unity Catalog 内の任意のセキュリティ保護可能なオブジェクト (カタログ、スキーマ、テーブル、ボリューム、AI モデルなど) にコメントを追加できます。 また、テーブルの列にコメントを追加することもできます。

コメントは手動で追加することも、Databricks で AI が生成したコメントを作成させることもできます。 AI が生成したコメント (AI が生成したドキュメントとも呼ばれます) は、テーブルとテーブル列で使用できます。 「AI で生成されたコメントを Unity Catalog オブジェクトに追加する」を参照してください。

テーブルUnity Catalog (またはレガシーDelta Lake のHive metastore テーブル) のコメントを変更すると、テーブル履歴の 操作によって、テーブルコメントの定義に使用されたSET TBLPROPERTIES SQLクエリが記録されます。

始める前に

コメントを追加または編集するには、次の要件を満たす必要があります。

  • カタログ、スキーマ、ボリューム、モデル、共有、受信者、プロバイダー、ストレージ認証情報、外部ロケーション、または接続に対するコメントを追加または編集するには、オブジェクトの所有者であるか、オブジェクトに対する MANAGE 権限を持っている必要があります。

  • テーブルまたは列のコメントを追加または編集するには、所有者であるか、次の権限を持っている必要があります。

    • MODIFY そしてテーブルの上に SELECT
    • USE CATALOG 親カタログとスキーマに USE SCHEMA します。
  • SQLをサポートする ウェアハウスまたはその他のコンピュートを使用する必要があります。Unity Catalog

  • AI が生成したコメントを使用するには、ワークスペースで AI 支援機能が有効になっている必要があります。 「AI で生成されたコメントを Unity Catalog オブジェクトに追加する」を参照してください。

コメントの追加と編集

セキュリティ保護可能なオブジェクトにコメントを追加したり、SQL コマンドやカタログ エクスプローラを使用して編集したりできます。

important

Saving comments triggers an ALTER SQL command, which can disrupt Databricks pipelines and jobs.

  1. In the workspace sidebar, click Catalog icon Catalog to open Catalog Explorer.

  2. Search for and select the object you want to comment on.

    Data and AI objects are listed and searchable in the Catalog pane. Shares, storage credentials, external locations, and connections are accessible using the menu that opens when you click the Gear icon gear icon.

  3. Add a comment or edit an existing comment.

    • To add a comment to a table using AI-generated comments, view the AI Suggested Comment in the right pane of the Overview tab. It might take a few seconds to appear. Either Accept it as-is or Edit and save it.
    • To add a comment to a table column using AI-generated comments, click the AI generate button above the column list. Databricks generates comments for each column. Accept them as-is or edit them. Click the check mark to save the comment.
    • To add a comment to an object that doesn’t support AI-generated comments, click Add comment to add a comment.
    • To add a comment to a table column without using AI-generated comments, click the Icon to add a column tag or comment Add comment icon in the column row.
    • If a comment already exists, it appears in the right pane on the Overview tab or below the object name. If it is not AI-generated, click the Edit icon edit icon to edit it.

You can use basic Markdown to style comments in the Catalog Explorer UI. Markdown styling does not render when returned by DESCRIBE statements. All basic syntax is supported in Catalog Explorer except images, and only two heading levels are rendered. For more information, see Basic Syntax.

For more information about AI-generated comments, see Add AI-generated comments to Unity Catalog objects.