cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Error with GRANT in Databricks SQL

Prabakar
Databricks Employee
Databricks Employee

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
Databricks Employee
Databricks Employee

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
Databricks Employee
Databricks Employee

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 

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