---
title: Manage metric views
description: "Manage Unity Catalog metric views in Catalog Explorer: control access, enable collaborative editing, set permissions, and drop views."
canonical_url: https://docs.databricks.com/aws/en/uc-semantics/metric-views/manage
---

# 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.

## <a id="view-details-ui" />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:

1. Click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog** in the sidebar.
2. Browse available data or use the search bar to search for the metric view by name.
3. 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.

## <a id="set-permissions" />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 they contain. The following example grants minimum privileges for users in the `data_consumers` group to query a metric view:

```sql
GRANT SELECT ON orders_metric_view to `data-consumers`;
```

To learn more about privileges in Unity Catalog, see [Manage privileges in Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md). To learn more about creating and managing groups, see [Groups](https://docs.databricks.com/aws/en/admin/users-groups/groups.md).

### Grant permissions using the UI

You can also grant privileges using Catalog Explorer:

1. Find the metric view in Catalog Explorer.
2. Click **Permissions**.
3. Use the UI to grant and revoke permissions for other Databricks users and groups.

For more details, see [ Grant permissions on an object](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md#grant-perms).

## <a id="edit" />Edit a metric view

You must be the owner of a metric view to edit its definition. To enable collaborative editing, transfer ownership to a group. See [Enable collaborative editing](https://docs.databricks.com/aws/en/uc-semantics/metric-views/manage.md#collaborative-editing).

To edit a metric view in Catalog Explorer:

1. Find the metric view in Catalog Explorer.
2. Click **Edit** to open the editor.
3. Use the **UI** tab to change fields and measures interactively, or click the `<>` button to edit the YAML definition directly.
4. Click **Save**.

Any user with at least `SELECT` privileges can query the metric view. To learn more about managing permissions, see [Set permissions](https://docs.databricks.com/aws/en/uc-semantics/metric-views/manage.md#set-permissions).

**Edit with SQL**

To edit a metric view with SQL, use `ALTER VIEW` with an updated YAML definition. `ALTER VIEW` replaces the full definition, so include the complete YAML, not only the parts you change:

```sql
ALTER VIEW catalog.schema.orders_metric_view
AS $$
  <complete YAML definition>
$$
```

## <a id="collaborative-editing" />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:

1. Create or identify a group that should have edit access to the metric view. See [Groups](https://docs.databricks.com/aws/en/admin/users-groups/groups.md).
2. Grant the group `SELECT` access to all tables the metric view depends on.
3. Transfer ownership of the metric view to the group. See [Manage object ownership](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md#manage-ownership).
4. Add or remove users from the group to control who can edit the metric view.

> [!NOTE]
>
> Transferring ownership to a group is not supported for materialized metric views. Collaborative editing is only available for non-materialized metric views.

## <a id="share" />Share metric views

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

You can share metric views with Databricks users in other metastores or accounts using OpenSharing. See [Add metric views to a share](https://docs.databricks.com/aws/en/opensharing/create-share.md#metric-views).

## <a id="drop-metric-view" />Drop a metric view

Use `DROP VIEW` syntax to delete a metric view:

```sql
DROP VIEW orders_metric_view;
```

> [!WARNING]
>
> Dropping a metric view is permanent and can't be undone. Verify 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.

## <a id="limitations" />Limitations

Metric views don't support data profiling.

## <a id="additional-resources" /> Additional resources

* [Query metric views](https://docs.databricks.com/aws/en/uc-semantics/metric-views/query.md)
* [Model metric views](https://docs.databricks.com/aws/en/uc-semantics/metric-views/basic-modeling.md)
* [Manage privileges in Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md)
* [What is Catalog Explorer?](https://docs.databricks.com/aws/en/catalog-explorer/index.md)
* [Relationships between metric views](https://docs.databricks.com/aws/en/uc-semantics/metric-views/relationships.md)
