Cant read/write tables with shared cluster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 10:14 AM - edited 02-19-2025 10:19 AM
Hi!
I have a pipeline that i cant execute sucessfully in a shared cluster. Basically i read a query from multiple sources on my databricks instance, including streaming tables (thats the reason i have to use a shared cluster).
But when comes to the part to write the results to my hive_metastore bronze layer, i get insuficient permission errors, the first one was that the cluster did'nt have access permission enough to determine if given table existed, i got arround that error with a quick and dirty python solution:
Grant permissions via sql code in the notebook using the grant permission to user, grant ownership, grant all-files permission but i cant work arround this issue.
My user has all the permissions to create, modify, delete tables in hive_metastore and other catalogs but i suspect it is a cluster level permission issue.
Anyone faced the same situation?
- Labels:
-
Delta Lake
-
Spark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 01:04 AM
What path do you use to save data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 04:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 06:44 AM
Is datalake correct name of you storage? You should check if you have access to external locations in UC and if the name is correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 09:10 AM
datalake is just a placeholder name. You mean check if my user has access to external locations in UC or if the cluster has access?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 08:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 09:32 AM
already tried this solution, throws this error:
SparkSecurityException: [INSUFFICIENT_PERMISSIONS] Insufficient privileges: User does not own database `db_bronze`.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago - last edited 2 weeks ago
Just an update to this topic:
Some days ago me and my databricks admin were vizualizing the same notebook using the shared cluster, he ran the cell with insert and 'grant all permissions on db_bronze to 'myuser@company'.
It took a while but the table was created and populated. Fast forward a few days, we had to change the logic on the sql query, i've updated the query, but i need to drop/truncate the table created previously and guess what: Insuficient permissions.
This specific catalog is in hive_metastore, what permission i need to ask to my admin to my profile?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @Ramonrcn,
If I understand your question, you should need to have MODIFY / ALL PRIVILEGES permission on top of the table inorder to drop or modify a table. And if you are performing this change using Managed Identity / IAM, the same permission mentioned above should have to be applied.
Please check the highlighted section in Databricks docs for necessary privileges required: https://docs.databricks.com/aws/en/data-governance/table-acls/object-privileges#privileges-you-can-g...
Best Regards,
Nivethan

