Skip to main content

grants

Operations on a grants resource.

Overview

Namegrants
TypeResource
Iddatabricks_workspace.unitycatalog.grants

Fields

NameDatatype
principalstring
privilegesarray

Methods

NameAccessible byRequired ParamsDescription
getSELECTfull_name, securable_type, deployment_nameGets the permissions for a securable.
updateUPDATEfull_name, securable_type, deployment_nameUpdates the permissions for a securable.

SELECT examples

SELECT
principal,
privileges
FROM databricks_workspace.unitycatalog.grants
WHERE full_name = '{{ full_name }}' AND
securable_type = '{{ securable_type }}' AND
deployment_name = '{{ deployment_name }}';

UPDATE example

Updates a grants resource.

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