Skip to main content

share_permissions

Operations on a share_permissions resource.

Overview

Nameshare_permissions
TypeResource
Iddatabricks_workspace.deltasharing.share_permissions

Fields

NameDatatype
principalstring
privilegesarray

Methods

NameAccessible byRequired ParamsDescription
sharepermissionsSELECTname, deployment_nameGets the permissions for a data share from the metastore. The caller must be a metastore admin or the owner of the share.
updatepermissionsUPDATEname, deployment_nameUpdates the permissions for a data share in the metastore. The caller must be a metastore admin or an owner of the share.

SELECT examples

SELECT
principal,
privileges
FROM databricks_workspace.deltasharing.share_permissions
WHERE name = '{{ name }}' AND
deployment_name = '{{ deployment_name }}';

UPDATE example

Updates a share_permissions resource.

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