john-bodley commented on a change in pull request #15403:
URL: https://github.com/apache/superset/pull/15403#discussion_r674157879
##########
File path: superset/db_engine_specs/snowflake.py
##########
@@ -128,3 +129,34 @@ def mutate_db_for_connection_test(database: "Database") ->
None:
engine_params["connect_args"] = connect_args
extra["engine_params"] = engine_params
database.extra = json.dumps(extra)
+
+ @classmethod
+ def get_cancel_query_id(cls, cursor: Any, query: Query) -> Optional[str]:
+ """
+ Get Snowflake session ID that will be used to cancel all other running
+ queries in the same session.
+
+ :param cursor: Cursor instance in which the query will be executed
+ :param query: Query instance
+ :return: Snowflake Session ID
+ """
+ cursor.execute("SELECT CURRENT_SESSION()")
Review comment:
Apologies. I misread the code logic. I originally thought the new cursor
which is used to stop the query was being used to obtain the session identifier.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]