volumes
Creates, updates, deletes, gets or lists a volumes
resource.
Overview
Name | volumes |
Type | Resource |
Id | databricks_workspace.unitycatalog.volumes |
Fields
The following fields are returned by SELECT
queries:
- read
- list
Successfully retrieved the properties of the volume
Name | Datatype | Description |
---|---|---|
name | string | |
metastore_id | string | |
volume_id | string | |
catalog_name | string | |
full_name | string | |
schema_name | string | |
comment | string | |
created_at | integer | |
created_by | string | |
owner | string | |
storage_location | string | |
updated_at | integer | |
updated_by | string | |
volume_type | string |
The volume list was successfully retrieved
Name | Datatype | Description |
---|---|---|
name | string | |
metastore_id | string | |
volume_id | string | |
catalog_name | string | |
full_name | string | |
schema_name | string | |
comment | string | |
created_at | integer | |
created_by | string | |
owner | string | |
storage_location | string | |
updated_at | integer | |
updated_by | string | |
volume_type | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
read | select | deployment_name | Gets a volume from the metastore for a specific catalog and schema. | |
list | select | deployment_name | Gets an array of volumes for the current metastore under the parent catalog and schema. | |
create | insert | deployment_name | Creates a new volume. | |
update | update | deployment_name | Updates the specified volume under the specified parent catalog and schema. | |
delete | delete | deployment_name | Deletes a volume from the specified parent catalog and schema. |
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
- read
- list
Gets a volume from the metastore for a specific catalog and schema.
SELECT
name,
metastore_id,
volume_id,
catalog_name,
full_name,
schema_name,
comment,
created_at,
created_by,
owner,
storage_location,
updated_at,
updated_by,
volume_type
FROM databricks_workspace.unitycatalog.volumes
WHERE deployment_name = '{{ deployment_name }}' -- required;
Gets an array of volumes for the current metastore under the parent catalog and schema.
SELECT
name,
metastore_id,
volume_id,
catalog_name,
full_name,
schema_name,
comment,
created_at,
created_by,
owner,
storage_location,
updated_at,
updated_by,
volume_type
FROM databricks_workspace.unitycatalog.volumes
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Creates a new volume.
INSERT INTO databricks_workspace.unitycatalog.volumes (
data__catalog_name,
data__schema_name,
data__name,
data__volume_type,
data__storage_location,
data__comment,
deployment_name
)
SELECT
'{{ catalog_name }}',
'{{ schema_name }}',
'{{ name }}',
'{{ volume_type }}',
'{{ storage_location }}',
'{{ comment }}',
'{{ deployment_name }}'
RETURNING
name,
metastore_id,
volume_id,
catalog_name,
full_name,
schema_name,
comment,
created_at,
created_by,
owner,
storage_location,
updated_at,
updated_by,
volume_type
;
# Description fields are for documentation purposes
- name: volumes
props:
- name: deployment_name
value: string
description: Required parameter for the volumes resource.
- name: catalog_name
value: required
- name: schema_name
value: string
- name: name
value: required
- name: volume_type
value: string
- name: storage_location
value: required
- name: comment
value: string
UPDATE
examples
- update
Updates the specified volume under the specified parent catalog and schema.
UPDATE databricks_workspace.unitycatalog.volumes
SET
data__owner = '{{ owner }}',
data__comment = '{{ comment }}',
data__new_name = '{{ new_name }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
name,
metastore_id,
volume_id,
catalog_name,
full_name,
schema_name,
comment,
created_at,
created_by,
owner,
storage_location,
updated_at,
updated_by,
volume_type;
DELETE
examples
- delete
Deletes a volume from the specified parent catalog and schema.
DELETE FROM databricks_workspace.unitycatalog.volumes
WHERE deployment_name = '{{ deployment_name }}' --required;