Manage metric views
Metric views are registered to Unity Catalog and can be managed using Catalog Explorer. Users with at least SELECT permission can view metric view details, and owners can control access, enable collaborative editing, and manage the lifecycle of metric views through the UI or SQL commands.
View metric views in Catalog Explorer
Catalog Explorer provides an interface for viewing and managing metric views.
To access a metric view in Catalog Explorer:
- Click
Catalog in the sidebar.
- Browse available data or use the search bar to search for the metric view by name.
- Click the name of the metric view.
Catalog Explorer displays information across multiple tabs. Use each tab to view or edit details for the metric view.
Set permissions
Metric views use the same hierarchical permissions model as other Unity Catalog securable objects. No new permissions are necessary if your metric view is stored in a schema that the intended consumers have read access to. You can assign permissions on the metric view from the Permissions tab or using SQL.
Grant privileges using SQL
A metric view is a Unity Catalog securable object and follows the same permission model as other views. Privileges are hierarchical, so privileges on a metastore, catalog, or schema cascade to the objects contained within. The following example grants minimum privileges for users in the data_consumers group to query a metric view:
GRANT SELECT ON orders_metric_view to `data-consumers`;
To learn more about privileges in Unity Catalog, see Manage privileges in Unity Catalog. To learn more about creating and managing groups, see Groups.
Grant permissions using the UI
You can also grant privileges using Catalog Explorer:
- Find the metric view in Catalog Explorer.
- Click Permissions.
- Use the UI to grant and revoke permissions for other Databricks users and groups.
For more details, see Grant permissions on an object.
Enable collaborative editing
Only the owner of a metric view can edit its definition. To enable multiple people to collaborate on the same metric view, transfer ownership to a group. All members of that group can then edit the definition. The metric view can only access data that the group has permissions to select.
To enable collaborative editing:
- Create or identify a group that should have edit access to the metric view. See Groups.
- Grant the group
SELECTaccess to all tables the metric view depends on. - Transfer ownership of the metric view to the group. See Transfer ownership.
- Add or remove users from the group to control who can edit the metric view.
Transferring ownership to a group is not supported for materialized metric views. Collaborative editing is only available for non-materialized metric views.
Drop a metric view
Use DROP VIEW syntax to delete a metric view:
DROP VIEW orders_metric_view;
Dropping a metric view is permanent and can't be undone. Ensure that no downstream consumers (dashboards, notebooks, queries) depend on the metric view before dropping it. Use the Lineage tab in Catalog Explorer to identify dependencies.
Limitations
Metric views don't support Delta Sharing or data profiling.