catalogs
Creates, updates, deletes, gets or lists a catalogs
resource.
Overview
Name | catalogs |
Type | Resource |
Id | databricks_workspace.unitycatalog.catalogs |
Fields
The following fields are returned by SELECT
queries:
- get
- list
The catalog was successfully retrieved.
Name | Datatype | Description |
---|---|---|
name | string | |
metastore_id | string | |
connection_name | string | |
full_name | string | |
provider_name | string | |
share_name | string | |
browse_only | boolean | |
catalog_type | string | |
comment | string | |
created_at | integer | |
created_by | string | |
effective_predictive_optimization_flag | object | |
enable_predictive_optimization | string | |
isolation_mode | string | |
options | object | |
owner | string | |
properties | object | |
provisioning_info | object | |
securable_kind | string | |
securable_type | string | |
storage_location | string | |
storage_root | string | |
updated_at | integer | |
updated_by | string |
The catalog list was successfully retrieved.
Name | Datatype | Description |
---|---|---|
name | string | |
metastore_id | string | |
connection_name | string | |
full_name | string | |
provider_name | string | |
share_name | string | |
browse_only | boolean | |
catalog_type | string | |
comment | string | |
created_at | integer | |
created_by | string | |
effective_predictive_optimization_flag | object | |
enable_predictive_optimization | string | |
isolation_mode | string | |
options | object | |
owner | string | |
properties | object | |
provisioning_info | object | |
securable_kind | string | |
securable_type | string | |
storage_location | string | |
storage_root | string | |
updated_at | integer | |
updated_by | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | deployment_name | Gets the specified catalog in a metastore. The caller must be a metastore admin, the owner of the catalog, or a user that has the | |
list | select | deployment_name | Gets an array of catalogs in the metastore. If the caller is the metastore admin, all catalogs will be retrieved. Otherwise, only catalogs owned by the caller (or for which the caller has the | |
create | insert | deployment_name | Creates a new catalog instance in the parent metastore if the caller is a metastore admin or has the | |
update | update | deployment_name | Updates the catalog that matches the supplied name. The caller must be either the owner of the catalog, or a metastore admin (when changing the owner field of the catalog). | |
delete | delete | deployment_name | Deletes the catalog that matches the supplied name. The caller must be a metastore admin or the owner of the catalog. |
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 |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- get
- list
Gets the specified catalog in a metastore. The caller must be a metastore admin, the owner of the catalog, or a user that has the
SELECT
name,
metastore_id,
connection_name,
full_name,
provider_name,
share_name,
browse_only,
catalog_type,
comment,
created_at,
created_by,
effective_predictive_optimization_flag,
enable_predictive_optimization,
isolation_mode,
options,
owner,
properties,
provisioning_info,
securable_kind,
securable_type,
storage_location,
storage_root,
updated_at,
updated_by
FROM databricks_workspace.unitycatalog.catalogs
WHERE deployment_name = '{{ deployment_name }}' -- required;
Gets an array of catalogs in the metastore. If the caller is the metastore admin, all catalogs will be retrieved. Otherwise, only catalogs owned by the caller (or for which the caller has the
SELECT
name,
metastore_id,
connection_name,
full_name,
provider_name,
share_name,
browse_only,
catalog_type,
comment,
created_at,
created_by,
effective_predictive_optimization_flag,
enable_predictive_optimization,
isolation_mode,
options,
owner,
properties,
provisioning_info,
securable_kind,
securable_type,
storage_location,
storage_root,
updated_at,
updated_by
FROM databricks_workspace.unitycatalog.catalogs
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Creates a new catalog instance in the parent metastore if the caller is a metastore admin or has the
INSERT INTO databricks_workspace.unitycatalog.catalogs (
data__name,
data__comment,
data__storage_root,
data__provider_name,
data__share_name,
data__connection_name,
data__properties,
data__options,
deployment_name
)
SELECT
'{{ name }}',
'{{ comment }}',
'{{ storage_root }}',
'{{ provider_name }}',
'{{ share_name }}',
'{{ connection_name }}',
'{{ properties }}',
'{{ options }}',
'{{ deployment_name }}'
RETURNING
name,
metastore_id,
connection_name,
full_name,
provider_name,
share_name,
browse_only,
catalog_type,
comment,
created_at,
created_by,
effective_predictive_optimization_flag,
enable_predictive_optimization,
isolation_mode,
options,
owner,
properties,
provisioning_info,
securable_kind,
securable_type,
storage_location,
storage_root,
updated_at,
updated_by
;
# Description fields are for documentation purposes
- name: catalogs
props:
- name: deployment_name
value: string
description: Required parameter for the catalogs resource.
- name: name
value: required
- name: comment
value: string
- name: storage_root
value: string
- name: provider_name
value: string
- name: share_name
value: string
- name: connection_name
value: string
- name: properties
value: object
- name: options
value: object
UPDATE
examples
- update
Updates the catalog that matches the supplied name. The caller must be either the owner of the catalog, or a metastore admin (when changing the owner field of the catalog).
UPDATE databricks_workspace.unitycatalog.catalogs
SET
data__owner = '{{ owner }}',
data__comment = '{{ comment }}',
data__isolation_mode = '{{ isolation_mode }}',
data__enable_predictive_optimization = '{{ enable_predictive_optimization }}',
data__new_name = '{{ new_name }}',
data__properties = '{{ properties }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
name,
metastore_id,
connection_name,
full_name,
provider_name,
share_name,
browse_only,
catalog_type,
comment,
created_at,
created_by,
effective_predictive_optimization_flag,
enable_predictive_optimization,
isolation_mode,
options,
owner,
properties,
provisioning_info,
securable_kind,
securable_type,
storage_location,
storage_root,
updated_at,
updated_by;
DELETE
examples
- delete
Deletes the catalog that matches the supplied name. The caller must be a metastore admin or the owner of the catalog.
DELETE FROM databricks_workspace.unitycatalog.catalogs
WHERE deployment_name = '{{ deployment_name }}' --required;