recipients
Operations on a recipients
resource.
Overview
Name | recipients |
Type | Resource |
Id | databricks_workspace.deltasharing.recipients |
Fields
Name | Datatype |
---|---|
name | string |
activated | boolean |
activation_url | string |
authentication_type | string |
cloud | string |
comment | string |
created_at | integer |
created_by | string |
data_recipient_global_metastore_id | string |
ip_access_list | object |
metastore_id | string |
owner | string |
properties_kvpairs | object |
region | string |
sharing_code | string |
tokens | array |
updated_at | integer |
updated_by | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | name, deployment_name | Gets a share recipient from the metastore if: |
list | SELECT | deployment_name | Gets an array of all share recipients within the current metastore where: |
create | INSERT | deployment_name | Creates a new recipient with the delta sharing authentication type in the metastore. The caller must be a metastore admin or has the |
delete | DELETE | name, deployment_name | Deletes the specified recipient from the metastore. The caller must be the owner of the recipient. |
update | UPDATE | name, deployment_name | Updates 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. |
rotatetoken | EXEC | name, deployment_name | Refreshes the specified recipient's delta sharing authentication token with the provided token info. The caller must be the owner of the recipient. |
SELECT
examples
- recipients (list)
- recipients (get)
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 }}';
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 name = '{{ name }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new recipients
resource.
- recipients
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: authentication_type
value: TOKEN
- name: owner
value: string
- name: comment
value: string
- name: ip_access_list
value:
allowed_ip_addresses:
- string
- name: properties_kvpairs
value:
properties:
property1: string
property2: string
- name: data_recipient_global_metastore_id
value: string
- name: sharing_code
value: string
- name: expiration_time
value: 0
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 }}';