03-06-2023 07:17 AM
Is there a "read only" option when using databricks sql using jdbc driver?
I'm looking for an equivalent to this:
Thanks!
03-08-2023 10:50 PM
Hi, You can refer to https://docs.databricks.com/external-data/jdbc.html#read-data-with-jdbc
Please let us know if this helps.
Also please tag @Debayan with your next response which will notify me, Thank you!
03-09-2023 12:34 AM
@Debayan Mukherjee Thanks for your reply - but I don't think this help my case:
I want to let my app's users to be able to query over my databricks sql server, with prevention of editing data.
Statements like drop, insert, delete, update, truncate, etc... should not be allowed in that context.
Perhaps I did not fully understand your suggestion...
Thanks!
03-11-2023 07:15 AM
@Nativ Issac I would suggest to use a PAT token created on behalf of a service principal and grant SELECT privilege only to the service principal to the targeted catalogs/schemas/tables. Thus you can restrict the access to the data using JDBC. Please refer to below docs on the same topic. Hope this helps.
https://docs.databricks.com/dev-tools/api/latest/token-management.html#operation/get-token
https://docs.databricks.com/data-governance/unity-catalog/manage-privileges/privileges.html
https://docs.databricks.com/archive/spark-sql-2.x-language-manual/grant.html
03-31-2023 02:57 AM
Hi @Nativ Issac
Hope everything is going great.
Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you.
Cheers!
03-31-2023 03:27 AM
Hello @Vartika Nain ,
Still struggling with this
03-31-2023 03:38 AM
@Nativ Issac
Have you tried these steps?
04-02-2023 12:12 AM
Hello @John Lourdu
Thanks for your reply!
Unfortunately, for my project purposes, I can't do your suggested solution:
The project I'm working on is getting credentials of a customer databricks sql server and can not create service accounts etc...
Getting the customer do your solution is not the best option for me: it's a large company so every interaction is a hassle in terms of bureaucracy and politics..
Therefore I'm looking for a software solution.
Hope we can figure this out..
Thanks!
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.