-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use readonly transaction #97
Comments
@wusendong just letting you know that @IlyaFaer is looking into how to support this. I don't believe there's a way to trigger the implementation to use read-only SQL in the current implementation. But @IlyaFaer will get back to you with details. |
Yes, it looks like we need to do some changes in code first. Working on it. |
@IlyaFaer glad to hear that 👍 |
@wusendong, by default a connection is in non-autocommit mode. However, if your case doesn't require to stay in non-autocommit mode, you probably can initiate a connection manually from the engine, turn it into |
Good to see your quick implementation, this will help us a lot 👏 |
I am hitting the same issue here. I have a client application using spanner-sqlalchemy and when it's used by an IAM user with the The query is quite a standard sqlalchemy one: just getting some rows by their primary indices and calling `query.all() at the end. |
I want to execute the query from a database in which my service account has no
beginOrRollbackReadWriteTransaction
permission, and I use this library with pandas via codes like here:And I got a message returns: "Caller is missing IAM permission spanner.databases.beginOrRollbackReadWriteTransaction on resource projects/project_id/instances/instance_id/databases/demo"
So how to use this library to execute some read-only SQL? Because I want only a limited number of people to have write access
The text was updated successfully, but these errors were encountered: