This article shows how to apply tags in Unity Catalog.
Tags are attributes containing keys and optional values that you can apply to different securable objects in Unity Catalog. Tagging is useful for organizing and categorizing different securable objects within a metastore. Using tags also simplifies search and discovery of your data assets.
Securable object tagging is currently supported on catalogs, schemas, tables, and models. For more information on securable objects, see Securable objects in Unity Catalog.
To add tags to Unity Catalog securable objects, include the
APPLY_TAG privilege on the securable object. This privilege was introduced to govern the tagging operations. Only securable objects registered within Unity Catalog are taggable.
The following is a list of tag constraints:
You can assign a maximum of 20 tags to a single securable object.
The maximum length of a tag is 255 characters.
Special characters cannot be used in tag names.
Searching Unity Catalog tables by tag name or value is supported with the exact match only.
To manage securable object tags using the Catalog Explorer UI:
Click Catalog in the sidebar.
Select a securable object to view the tag information.
Click Add/Edit Tags to manage tags for the current securable object. You can add and remove multiple tags simultaneously in the tag management modal.
Each catalog created on Unity Catalog includes an
INFORMATION_SCHEMA. This schema includes tables describing the objects known to the schema’s catalog. You must have the appropriate privileges to view the schema information.
You can query the following to retrieve tag information:
For more information, see Information schema.
This feature is only available for Databricks Runtime versions of 13.3 and above.
Currently, Databricks supports tagging SQL commands with catalogs, schemas, tables (views, materialized views, streaming tables), and table columns. Learn more about the Databricks SQL tag commands at SQL language reference.
To search and filter tables using tags:
Click the Search field in the top bar of the Databricks workspace or use the keyboard shortcut Command-P.
Enter your search criteria. Search for tables in Unity Catalog by entering the assigned tag name or value.
You can also use the tag filter in the Table search tab to filter search results with existing tag names.