shares
Creates, updates, deletes, gets or lists a shares
resource.
Overview
Name | shares |
Type | Resource |
Id | databricks_workspace.deltasharing.shares |
Fields
The following fields are returned by SELECT
queries:
- get
- list
The share was successfully retrieved.
Name | Datatype | Description |
---|---|---|
name | string | |
comment | string | |
created_at | integer | |
created_by | string | |
objects | array | |
owner | string | |
storage_location | string | |
storage_root | string | |
updated_at | integer | |
updated_by | string |
The shares list was successfully retrieved.
Name | Datatype | Description |
---|---|---|
name | string | |
comment | string | |
created_at | integer | |
created_by | string | |
objects | array | |
owner | 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 a data object share from the metastore. The caller must be a metastore admin or the owner of the share. | |
list | select | deployment_name | Gets an array of data object shares from the metastore. The caller must be a metastore admin or the owner of the share. There is no guarantee of a specific ordering of the elements in the array. | |
create | insert | deployment_name | Creates a new share for data objects. Data objects can be added after creation with | |
update | update | deployment_name | Updates the share with the changes and data objects in the request. The caller must be the owner of the share or a metastore admin. | |
delete | delete | deployment_name | Deletes a data object share from the metastore. The caller must be an owner of the share. |
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 a data object share from the metastore. The caller must be a metastore admin or the owner of the share.
SELECT
name,
comment,
created_at,
created_by,
objects,
owner,
storage_location,
storage_root,
updated_at,
updated_by
FROM databricks_workspace.deltasharing.shares
WHERE deployment_name = '{{ deployment_name }}' -- required;
Gets an array of data object shares from the metastore. The caller must be a metastore admin or the owner of the share. There is no guarantee of a specific ordering of the elements in the array.
SELECT
name,
comment,
created_at,
created_by,
objects,
owner,
storage_location,
storage_root,
updated_at,
updated_by
FROM databricks_workspace.deltasharing.shares
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Creates a new share for data objects. Data objects can be added after creation with
INSERT INTO databricks_workspace.deltasharing.shares (
data__name,
data__comment,
data__storage_root,
deployment_name
)
SELECT
'{{ name }}',
'{{ comment }}',
'{{ storage_root }}',
'{{ deployment_name }}'
RETURNING
name,
comment,
created_at,
created_by,
objects,
owner,
storage_location,
storage_root,
updated_at,
updated_by
;
# Description fields are for documentation purposes
- name: shares
props:
- name: deployment_name
value: string
description: Required parameter for the shares resource.
- name: name
value: required
- name: comment
value: string
- name: storage_root
value: string
UPDATE
examples
- update
Updates the share with the changes and data objects in the request. The caller must be the owner of the share or a metastore admin.
UPDATE databricks_workspace.deltasharing.shares
SET
data__owner = '{{ owner }}',
data__comment = '{{ comment }}',
data__storage_root = '{{ storage_root }}',
data__new_name = '{{ new_name }}',
data__updates = '{{ updates }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
name,
comment,
created_at,
created_by,
objects,
owner,
storage_location,
storage_root,
updated_at,
updated_by;
DELETE
examples
- delete
Deletes a data object share from the metastore. The caller must be an owner of the share.
DELETE FROM databricks_workspace.deltasharing.shares
WHERE deployment_name = '{{ deployment_name }}' --required;