Skip to main content

Metastore Assignment

View as Markdown

MetastoreAssignment object

workspace_idint64

The unique ID of the <Databricks> workspace.

metastore_idstring

The unique ID of the metastore.

default_catalog_namestring

The name of the default catalog in the metastore. This field is deprecated. Please use "Default Namespace API" to configure the default catalog for a <Databricks> workspace.

Get GA

GET /api/2.1/unity-catalog/current-metastore-assignment

Gets the metastore assignment for the workspace being accessed.

API scopes: unity-catalog

Response

Returns the MetastoreAssignment object.

Create GA

PUT /api/2.1/unity-catalog/workspaces/{workspace_id}/metastore

Creates a new metastore assignment. If an assignment for the same workspace_id exists, it will be overwritten by the new metastore_id and default_catalog_name. The caller must be an account admin.

API scopes: unity-catalog

Parameters

workspace_idint64path

A workspace ID.

Request body

metastore_idstring

The unique ID of the metastore.

default_catalog_namestring

The name of the default catalog in the metastore. This field is deprecated. Please use "Default Namespace API" to configure the default catalog for a <Databricks> workspace.

Update GA

PATCH /api/2.1/unity-catalog/workspaces/{workspace_id}/metastore

Updates a metastore assignment. This operation can be used to update metastore_id or default_catalog_name for a specified Workspace, if the Workspace is already assigned a metastore. The caller must be an account admin to update metastore_id; otherwise, the caller can be a Workspace admin.

API scopes: unity-catalog

Parameters

workspace_idint64path

A workspace ID.

Request body

metastore_idstring

The unique ID of the metastore.

default_catalog_namestring

The name of the default catalog in the metastore. This field is deprecated. Please use "Default Namespace API" to configure the default catalog for a <Databricks> workspace.

Delete GA

DELETE /api/2.1/unity-catalog/workspaces/{workspace_id}/metastore

Deletes a metastore assignment. The caller must be an account administrator.

API scopes: unity-catalog

Parameters

workspace_idint64path

A workspace ID.

metastore_idstringquery

Query for the ID of the metastore to delete.