Databricks SQL Connector for Python - how to cancel inflght exeuct

Viewed 36

we are trying to run the cursor.execute(query) in a separate thread, and would like user to cancel this query while it is still running, is it possible?

1 Answers

There is a cancel method in the cursor class that could be used to stop already executing query. Check connector documentation for more details, for example, you need to call close to clear used resources

Related