cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

1 ACCEPTED SOLUTION

Accepted Solutions

mhiltner
Contributor III
Contributor III

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

1 REPLY 1

mhiltner
Contributor III
Contributor III

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) 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group