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. 
   
   
![Athena](https://user-images.githubusercontent.com/57723564/177679429-93f3432b-b51e-4e81-a6cc-a99f94e73889.PNG)
   
   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: [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]

Reply via email to