Skip to main content

recipients

Operations on a recipients resource.

Overview

Namerecipients
TypeResource
Iddatabricks_workspace.deltasharing.recipients

Fields

NameDatatype
namestring
activatedboolean
activation_urlstring
authentication_typestring
cloudstring
commentstring
created_atinteger
created_bystring
data_recipient_global_metastore_idstring
ip_access_listobject
metastore_idstring
ownerstring
properties_kvpairsobject
regionstring
sharing_codestring
tokensarray
updated_atinteger
updated_bystring

Methods

NameAccessible byRequired ParamsDescription
getSELECTname, deployment_nameGets a share recipient from the metastore if:
listSELECTdeployment_nameGets an array of all share recipients within the current metastore where:
createINSERTdeployment_nameCreates a new recipient with the delta sharing authentication type in the metastore. The caller must be a metastore admin or has the
deleteDELETEname, deployment_nameDeletes the specified recipient from the metastore. The caller must be the owner of the recipient.
updateUPDATEname, deployment_nameUpdates an existing recipient in the metastore. The caller must be a metastore admin or the owner of the recipient. If the recipient name will be updated, the user must be both a metastore admin and the owner of the recipient.
rotatetokenEXECname, deployment_nameRefreshes the specified recipient's delta sharing authentication token with the provided token info. The caller must be the owner of the recipient.

SELECT examples

SELECT
name,
activated,
activation_url,
authentication_type,
cloud,
comment,
created_at,
created_by,
data_recipient_global_metastore_id,
ip_access_list,
metastore_id,
owner,
properties_kvpairs,
region,
sharing_code,
tokens,
updated_at,
updated_by
FROM databricks_workspace.deltasharing.recipients
WHERE deployment_name = '{{ deployment_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new recipients resource.

/*+ create */
INSERT INTO databricks_workspace.deltasharing.recipients (
deployment_name,
data__name,
data__authentication_type,
data__owner,
data__comment,
data__ip_access_list,
data__properties_kvpairs,
data__data_recipient_global_metastore_id,
data__sharing_code,
data__expiration_time
)
SELECT
'{{ deployment_name }}',
'{{ name }}',
'{{ authentication_type }}',
'{{ owner }}',
'{{ comment }}',
'{{ ip_access_list }}',
'{{ properties_kvpairs }}',
'{{ data_recipient_global_metastore_id }}',
'{{ sharing_code }}',
'{{ expiration_time }}'
;

UPDATE example

Updates a recipients resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_workspace.deltasharing.recipients
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE name = '{{ name }}' AND
deployment_name = '{{ deployment_name }}';

DELETE example

Deletes a recipients resource.

/*+ delete */
DELETE FROM databricks_workspace.deltasharing.recipients
WHERE name = '{{ name }}' AND
deployment_name = '{{ deployment_name }}';