- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 06:03 AM
Hey Guys,
Is there a way to open pyodbc read only connection with simba spark driver?
At the moment, I'm able to execute queries such as select , delete, insert into - basically every sql statement using pyodbc.
I tried to open pyodbc connection but only with read permissions which means the user won't be able to delete/ create/ change any table - just read data from it. but didn't succeed.
I tried open connections in this way:
con = pyodbc.connect(connection_string, autocommit=True, readonly=True)
Is there a built in way already? Or I must check the query that i have been asked to execute?
Hope you can help me,
Thanks!
- Labels:
-
Connection
-
Pyodbc
-
Simba Spark Driver
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 07:50 AM
This readonly=True is working only on some drivers. Just create additional users with granted read-only permission.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 07:50 AM
This readonly=True is working only on some drivers. Just create additional users with granted read-only permission.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 08:04 AM
Thanks, I saw in pyodbc issues that not all drivers support it too.
But wanted to ask just to be sure.!

