Create a Unity Catalog metastore

Preview

Unity Catalog is in Public Preview. To participate in the preview, contact your Databricks representative.

This article shows how to create a metastore in Unity Catalog and link it to workspaces.

Note

In addition to the approaches in this article, you can also create a metastore by using the Databricks Terraform provider and databricks_metastore. To enable Unity Catalog to access the metastore, use databricks_metastore_data_access. To link workspaces to a metastore, use databricks_metastore_assignment.

Requirements

Create the metastore

To create a Unity Catalog metastore, you create a storage bucket where the metastore’s metadata and managed tables will be stored, create an IAM role that Databricks uses to give access to that storage bucket, and then provide Databricks with the storage container path and IAM role name.

  1. Configure a storage bucket and IAM role in AWS.

    Use a dedicated S3 bucket for each metastore that you create.

    For instructions, see Configure a storage bucket and IAM role in AWS.

    Make a note of the S3 bucket path, which starts with s3://, and the IAM role ARN.

  2. Log in to the Databricks account console.

  3. Click Data Icon Data.

  4. Click Create Metastore.

    1. Enter a name for the metastore.

    2. Enter the region where the metastore will be deployed. For best performance, co-locate the workspaces, metastore and cloud storage location in the same cloud region.

    3. Enter the S3 bucket path (you can omit s3://) and IAM role name from Configure a storage bucket and IAM role in AWS.

  5. Click Create.

  6. When prompted, select workspaces to link to the metastore.

    For more information about linking workspaces to metastores, see Enable a workspace for Unity Catalog.

The user who creates a metastore is its owner. Databricks recommends that you reassign ownership of the metastore to a group. See (Recommended) Sync account-level identities from your IdP.

Delete a metastore

If you are closing your Databricks account or have another reason to delete access to data managed by your Unity Catalog metastore, you can delete the metastore.

Warning

All objects managed by the metastore will become inaccessible using Databricks workspaces. This action cannot be undone.

Managed table data and metadata will be auto-deleted after 30 days. External table data in your cloud storage is not affected by metastore deletion.

To delete a metastore:

  1. As a metastore admin, log in to the account console.

  2. Click Data Icon Data.

  3. Click the metastore name.

  4. On the Configuration tab, click the three-button menu at the far upper right and select Delete.

  5. On the confirmation dialog, enter the name of the metastore and click Delete.