-
Notifications
You must be signed in to change notification settings - Fork 104
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
Closing all cursors of a connection on a connection close #575
Comments
I do not think it would be that difficult to implement the same. I will address this when I have time. |
https://github.com/googleapis/python-bigquery/blob/main/google/cloud/bigquery/dbapi/cursor.py#L104-L106 Cursor polls until the end of query execution. PyAthena/tests/pyathena/test_cursor.py Lines 548 to 565 in 2787190
https://github.com/PyMySQL/PyMySQL/blob/main/pymysql/connections.py#L414-L434 |
Indeed, on bigquery client, it does not seem the query is being stopped when the cursor is closed 🤔 Thanks for the research you did. The issue might need to be handled in dbt. |
👋🏻 Hello community,
First, thanks for this package, we work with it extensively! 🥳
I was a previous maintainer of dbt-athena package. Under the hood, dbt-athena uses PyAthena to connect and execute queries on Athena.
We currently encounter an issue when we need to close a connection: dbt-labs/dbt-adapters#406. Basically, when we cancel a dbt invocation, we cannot properly cancel the running queries because a connection has no information about the created cursors, as for instance the big query client does.
Would you be open to add such feature in PyAthena so we can, on a cancel, stops all the cursors?
The text was updated successfully, but these errors were encountered: