Skip to main content

current_metastore_assignment

Creates, updates, deletes, gets or lists a current_metastore_assignment resource.

Overview

Namecurrent_metastore_assignment
TypeResource
Iddatabricks_workspace.catalog.current_metastore_assignment

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
metastore_idstringThe unique ID of the metastore.
workspace_idinteger
default_catalog_namestringThe 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdeployment_nameGets the metastore assignment for the workspace being accessed.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Gets the metastore assignment for the workspace being accessed.

SELECT
metastore_id,
workspace_id,
default_catalog_name
FROM databricks_workspace.catalog.current_metastore_assignment
WHERE deployment_name = '{{ deployment_name }}' -- required
;