cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Error with GRANT in Databricks SQL

Prabakar
Esteemed Contributor III
Esteemed Contributor III

While trying to GRANT SELECT permissions for a Database or Table it reports the below error.

Error running query
Operation not allowed: GRANT(line 1, pos 0)
== SQL ==
GRANT SELECT ON DATABASE my_database TO `my_table` LIMIT 1000
^^^

1 ACCEPTED SOLUTION

Accepted Solutions

Prabakar
Esteemed Contributor III
Esteemed Contributor III

In Databricks SQL, by default, the Limit clause is enabled. So trying GRANT with limit will throw the error. Uncheck the Limit to execute the GRANT successfully.

Default:

imageUncheck Limit to fix this.

image 

View solution in original post

1 REPLY 1

Prabakar
Esteemed Contributor III
Esteemed Contributor III

In Databricks SQL, by default, the Limit clause is enabled. So trying GRANT with limit will throw the error. Uncheck the Limit to execute the GRANT successfully.

Default:

imageUncheck Limit to fix this.

image 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.