Unable to provide access in unity catalog using SQL commands

NarenderKumar
New Contributor III

I am trying to provide access in unity catalog using the SQL commands.

I am following the below documentation:
https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/manage-privileges/

It suggests to create SQL commands in below format:

NarenderKumar_2-1715253228379.png

 


GRANT <privilege-type> ON <securable-type> <securable-name> TO <principal>

I have prepared following 3 commnads using above standard but all of them are failing.

 

NarenderKumar_1-1715253206943.png

 

Command -> GRANT USE CATALOG ON CATALOG uda_dev TO <my user group>
Error -> [PARSE_SYNTAX_ERROR] Syntax error at or near 'USE'. SQLSTATE: 42601

Command -> GRANT USE SCHEMA ON CATALOG uda_dev TO <my user group>
Error -> [PARSE_SYNTAX_ERROR] Syntax error at or near 'USE'. SQLSTATE: 42601

Command -> GRANT SELECT ON CATALOG uda_dev TO <my user group>
Error -> [PARSE_SYNTAX_ERROR] Syntax error at or near 'CATALOG': missing 'SHARE'. SQLSTATE: 42601

I believe my syntax is correct only. because the USE CATALOG, USE SCHEMA and SELECT are valid privilege type on a catalog as shown below:

NarenderKumar_3-1715253369442.png

 


I tried running these commands from SQL editor and notebook both.
I am getting the same issue.

My main goal is to provide table read access for all the tables in a particular schema to a user group.
I request to please help how to prepare the SQL commands.

mhiltner
Databricks Employee
Databricks Employee

Try this. For some reason the quotes are crazy when using these commands. 

GRANT USAGE ON CATALOG `uda_dev` TO `your-group`
 
GRANT SELECT ON SCHEMA uda_dev.default TO `your-group` (without quotes for the schema) 

View solution in original post