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 "[INSUFFICIENT_PERMISSIONS] Insufficient privileges SQLSTATE: 42501"

VCA50380
Contributor II

Hello,

When I do some DML statements using a view "the_source_view"  direcly in SQL as a basis, all works fine. I can do inserts in another Delta table based on the data coming out of this view.
It works too from a Job: WorkFlow -> Task -> Notebook containing SQL statements.

Now if I try to execute the same statements via PySpark, like I would do as a dynamic SQL in Oracle, I get the following error:
"
[INSUFFICIENT_PERMISSIONS] Insufficient privileges:
User does not have SELECT on Table 'mycatalog.mychema.__materialization_mat_951a1902_a8ff_43e1_aa6a_4ca05a4e3b19_the_source_view_1'. SQLSTATE: 42501
"
What is missing there in terms of privileges? When I look at the permissions, I don't see any difference with other tables or views.
The view  "the_source_view"  has been created by a colleague of another team, not by me, and so I don't have all details on "what is behing" if I can say.
The PySpark execution mean that I'm using a All Purpose compute.


Thanks for the help !
Vinc

1 ACCEPTED SOLUTION

Accepted Solutions

VCA50380
Contributor II

Hello,

Things are working as soon as I use a compute with Access Mode = Standard.
Vinc

View solution in original post

2 REPLIES 2

VCA50380
Contributor II

Hello,
In order to add a bit more of "context" on this question:
. Is there a difference of privileges needed when executing a SQL code in a Notebook - targeting a view like "the_source_view" in my example, versus executing a PySpark code which is using the same view ?

Thanks!

VCA50380
Contributor II

Hello,

Things are working as soon as I use a compute with Access Mode = Standard.
Vinc

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now