metastore_assignments
Creates, updates, deletes, gets or lists a metastore_assignments
resource.
Overview
Name | metastore_assignments |
Type | Resource |
Id | databricks_account.unity_catalog.metastore_assignments |
Fields
The following fields are returned by SELECT
queries:
- get
The workspace metastore assignment was successfully returned.
Name | Datatype | Description |
---|---|---|
metastore_id | string | |
workspace_id | integer | |
default_catalog_name | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | Gets the metastore assignment, if any, for the workspace specified by ID. If the workspace is assigned a metastore, the mappig will be returned. If no metastore is assigned to the workspace, the assignment will not be found and a 404 returned. | ||
create | insert | Creates an assignment to a metastore for a workspace | ||
update | replace | Updates an assignment to a metastore for a workspace. Currently, only the default catalog may be updated. | ||
delete | delete | Deletes a metastore assignment to a workspace, leaving the workspace with no metastore. |
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.
Name | Datatype | Description |
---|
SELECT
examples
- get
Gets the metastore assignment, if any, for the workspace specified by ID. If the workspace is assigned a metastore, the mappig will be returned. If no metastore is assigned to the workspace, the assignment will not be found and a 404 returned.
SELECT
metastore_id,
workspace_id,
default_catalog_name
FROM databricks_account.unity_catalog.metastore_assignments;
INSERT
examples
- create
- Manifest
Creates an assignment to a metastore for a workspace
INSERT INTO databricks_account.unity_catalog.metastore_assignments (
data__metastore_assignment
)
SELECT
'{{ metastore_assignment }}'
;
# Description fields are for documentation purposes
- name: metastore_assignments
props:
- name: metastore_assignment
value: object
REPLACE
examples
- update
Updates an assignment to a metastore for a workspace. Currently, only the default catalog may be updated.
REPLACE databricks_account.unity_catalog.metastore_assignments
SET
data__metastore_assignment = '{{ metastore_assignment }}'
WHERE
;
DELETE
examples
- delete
Deletes a metastore assignment to a workspace, leaving the workspace with no metastore.
DELETE FROM databricks_account.unity_catalog.metastore_assignments;