You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/07/07 02:50:15 UTC
[GitHub] [superset] mdeshmu commented on issue #17011: SQL Lab queries can't be stopped
mdeshmu commented on issue #17011:
URL: https://github.com/apache/superset/issues/17011#issuecomment-1176985123
@eschutho In Athena, query id is not available immediately after initiation of cursor.

with closing(engine.raw_connection()) as conn:
# get cursor
cursor = conn.cursor()
# fetch cancel query id from cursor **--> THIS WONT RETURN ANYTHING in case of Athena**
cancel_query_id = db_engine_spec.get_cancel_query_id(cursor, query)
# save cursor in metadata on query model
if cancel_query_id is not None:
query.set_extra_json_key(cancel_query_key, cancel_query_id)
session.commit()
...
# execute statement (thread is blocked) --> **WE WILL NEED A PARALLEL THREAD HERE TO GET QueryExecutionId**
result_set = execute_sql_statement(
statement,
query,
session,
cursor,
log_params,
apply_ctas,
)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org