Skip to main content

Assign a group as the metastore admin

Assign a group as the metastore admin for your Unity Catalog metastore. The metastore admin is a highly privileged role that owns the metastore and can manage privileges and transfer ownership of any object in it.

Databricks recommends that you assign a group as the metastore admin, rather than an individual user. Every member of the group is a metastore admin, so metastore administration continues when an individual user leaves your organization.

danger

The role can also belong to an individual user or a service principal. If one identity holds it, metastore administration depends on that one identity.

When you need a metastore admin​

If Databricks enabled your workspace for Unity Catalog automatically, the metastore might not have a metastore admin, and the metastore admin role is optional. For these workspaces, workspace admins also receive metastore-level privileges such as CREATE CATALOG and CREATE EXTERNAL LOCATION by default.

You must assign a metastore admin to change the ownership of objects that you don't own, such as catalogs and external locations that individual users created. To transfer that ownership after you assign the group, see Transfer Unity Catalog object ownership to groups.

See Metastore admins.

Requirements​

Before you begin, meet these requirements:

  • You must be an account admin.
  • You must have an account group for metastore admins, such as metastore-admins. To create a group, see Create groups for access.

Assign the metastore admin group​

Assign the group in the account console, and then optionally configure auto-assignment and external sharing.

Open the metastore​

Open the metastore properties in the account console:

  1. As an account admin, log in to the account console.
  2. Click Data icon. Catalog.
  3. Click the name of the metastore to open its properties.

Assign the group​

Change the metastore admin to the group that you created:

  1. Under Metastore Admin, click Edit.
  2. Select the metastore admin group. To search for the group, enter part of its name.
  3. Click Save.

The assignment can take up to 30 seconds to take effect in your account, and longer in some workspaces.

Configure workspace auto-assignment (optional)​

To assign this metastore automatically to new workspaces in its region, do the following:

  1. On the Configuration tab, under Workspace assignment, select Automatically assign new workspaces in <region> to this metastore.
  2. On the confirmation dialog, click Enable auto-assignment.

See Enable a metastore to be automatically assigned to new workspaces.

Enable external sharing (optional)​

To share data with recipients outside your organization using OpenSharing, select Allow OpenSharing with parties outside your organization, and then configure the recipient token lifetime. You don't need this setting to share data between metastores in your Databricks account. See Enable OpenSharing on a metastore.

Verify the assignment​

Check the metastore's properties to confirm the group assignment:

Confirm the admin group in the account console:

  1. In the account console, click Data icon. Catalog, and then click the metastore name.
  2. Confirm that Metastore Admin shows the group name.

To confirm the group's rights in a workspace, do the following:

Confirm that the metastore admin group can create external locations from a workspace that is attached to the metastore:

  1. Log in to a workspace that is attached to the metastore, and click Data icon. Catalog.
  2. Click Connect > External Locations.
  3. Confirm that the page lists the existing external locations, and that you can create one. Metastore admins have the CREATE EXTERNAL LOCATION privilege by default.

Troubleshooting​

If you can't change the metastore admin, or the group's members don't get admin privileges, check the matching entry.

You can't edit the metastore admin

Only account admins can assign the metastore admin role. Confirm that you're an account admin.

Group members don't have metastore admin privileges

The assignment can take longer to take effect in some workspaces because of caching. Wait a few minutes, and then try again.

Next steps​