account_metastores
Creates, updates, deletes, gets or lists an account_metastores resource.
Overview
| Name | account_metastores |
| Type | Resource |
| Id | databricks_account.catalog.account_metastores |
Fields
The following fields are returned by SELECT queries:
- account_metastores_get
- account_metastores_list
| Name | Datatype | Description |
|---|---|---|
name | string | The user-specified name of the metastore. |
default_data_access_config_id | string | Unique identifier of the metastore's (Default) Data Access Configuration. |
global_metastore_id | string | Globally unique metastore ID across clouds and regions, of the form `cloud:region:metastore_id`. |
metastore_id | string | Unique identifier of metastore. |
storage_root_credential_id | string | UUID of storage credential to access the metastore storage_root. |
delta_sharing_organization_name | string | The organization name of a Delta Sharing entity, to be used in Databricks-to-Databricks Delta Sharing as the official name. |
storage_root_credential_name | string | Name of the storage credential to access the metastore storage_root. |
cloud | string | |
created_at | integer | Time at which this metastore was created, in epoch milliseconds. |
created_by | string | Username of metastore creator. |
delta_sharing_recipient_token_lifetime_in_seconds | integer | The lifetime of delta sharing recipient token in seconds. |
delta_sharing_scope | string | The scope of Delta Sharing enabled for the metastore. (INTERNAL, INTERNAL_AND_EXTERNAL) |
external_access_enabled | boolean | Whether to allow non-DBR clients to directly access entities under the metastore. |
owner | string | The owner of the metastore. |
privilege_model_version | string | Privilege model version of the metastore, of the form `major.minor` (e.g., `1.0`). |
region | string | Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). |
storage_root | string | The storage root URL for metastore |
updated_at | integer | Time at which the metastore was last modified, in epoch milliseconds. |
updated_by | string | Username of user who last modified the metastore. |
| Name | Datatype | Description |
|---|---|---|
name | string | The user-specified name of the metastore. |
default_data_access_config_id | string | Unique identifier of the metastore's (Default) Data Access Configuration. |
global_metastore_id | string | Globally unique metastore ID across clouds and regions, of the form `cloud:region:metastore_id`. |
metastore_id | string | Unique identifier of metastore. |
storage_root_credential_id | string | UUID of storage credential to access the metastore storage_root. |
delta_sharing_organization_name | string | The organization name of a Delta Sharing entity, to be used in Databricks-to-Databricks Delta Sharing as the official name. |
storage_root_credential_name | string | Name of the storage credential to access the metastore storage_root. |
cloud | string | |
created_at | integer | Time at which this metastore was created, in epoch milliseconds. |
created_by | string | Username of metastore creator. |
delta_sharing_recipient_token_lifetime_in_seconds | integer | The lifetime of delta sharing recipient token in seconds. |
delta_sharing_scope | string | The scope of Delta Sharing enabled for the metastore. (INTERNAL, INTERNAL_AND_EXTERNAL) |
external_access_enabled | boolean | Whether to allow non-DBR clients to directly access entities under the metastore. |
owner | string | The owner of the metastore. |
privilege_model_version | string | Privilege model version of the metastore, of the form `major.minor` (e.g., `1.0`). |
region | string | Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). |
storage_root | string | The storage root URL for metastore |
updated_at | integer | Time at which the metastore was last modified, in epoch milliseconds. |
updated_by | string | Username of user who last modified the metastore. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
account_metastores_get | select | account_id, metastore_id | Gets a Unity Catalog metastore from an account, both specified by ID. | |
account_metastores_list | select | account_id | Gets all Unity Catalog metastores associated with an account specified by ID. | |
account_metastores_create | insert | account_id | Creates a Unity Catalog metastore. | |
account_metastores_update | replace | account_id, metastore_id | Updates an existing Unity Catalog metastore. | |
account_metastores_delete | delete | account_id, metastore_id | force | Deletes a Unity Catalog metastore for an account, both specified by ID. |
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 |
|---|---|---|
account_id | string | |
metastore_id | string | Unity Catalog metastore ID |
force | boolean | Force deletion even if the metastore is not empty. Default is false. |
SELECT examples
- account_metastores_get
- account_metastores_list
Gets a Unity Catalog metastore from an account, both specified by ID.
SELECT
name,
default_data_access_config_id,
global_metastore_id,
metastore_id,
storage_root_credential_id,
delta_sharing_organization_name,
storage_root_credential_name,
cloud,
created_at,
created_by,
delta_sharing_recipient_token_lifetime_in_seconds,
delta_sharing_scope,
external_access_enabled,
owner,
privilege_model_version,
region,
storage_root,
updated_at,
updated_by
FROM databricks_account.catalog.account_metastores
WHERE account_id = '{{ account_id }}' -- required
AND metastore_id = '{{ metastore_id }}' -- required
;
Gets all Unity Catalog metastores associated with an account specified by ID.
SELECT
name,
default_data_access_config_id,
global_metastore_id,
metastore_id,
storage_root_credential_id,
delta_sharing_organization_name,
storage_root_credential_name,
cloud,
created_at,
created_by,
delta_sharing_recipient_token_lifetime_in_seconds,
delta_sharing_scope,
external_access_enabled,
owner,
privilege_model_version,
region,
storage_root,
updated_at,
updated_by
FROM databricks_account.catalog.account_metastores
WHERE account_id = '{{ account_id }}' -- required
;
INSERT examples
- account_metastores_create
- Manifest
Creates a Unity Catalog metastore.
INSERT INTO databricks_account.catalog.account_metastores (
metastore_info,
account_id
)
SELECT
'{{ metastore_info }}',
'{{ account_id }}'
RETURNING
metastore_info
;
# Description fields are for documentation purposes
- name: account_metastores
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the account_metastores resource.
- name: metastore_info
description: |
:returns: :class:`AccountsCreateMetastoreResponse`
value:
name: "{{ name }}"
external_access_enabled: {{ external_access_enabled }}
region: "{{ region }}"
storage_root: "{{ storage_root }}"
REPLACE examples
- account_metastores_update
Updates an existing Unity Catalog metastore.
REPLACE databricks_account.catalog.account_metastores
SET
metastore_info = '{{ metastore_info }}'
WHERE
account_id = '{{ account_id }}' --required
AND metastore_id = '{{ metastore_id }}' --required
RETURNING
metastore_info;
DELETE examples
- account_metastores_delete
Deletes a Unity Catalog metastore for an account, both specified by ID.
DELETE FROM databricks_account.catalog.account_metastores
WHERE account_id = '{{ account_id }}' --required
AND metastore_id = '{{ metastore_id }}' --required
AND force = '{{ force }}'
;