title: Asynchronous cursor execution in Snowflake
body: <p>(Submitting on behalf of a Snowflake user)</p>
  
  <hr>
  
  <p>At the time of query execution on Snowflake, I need its query id. So I am using following code snippet:</p>
  
  <pre><code>cursor.execute(query, _no_results=True)
  
  query_id = cursor.sfqid
  
  cursor.query_result(query_id)
  </code></pre>
  
  <p>This code snippet working fine for small running queries. But for query which takes more than 40-45 seconds to execute, query_result function fails with <code>KeyError u'rowtype'</code>.</p>
  
  <p>Stack trace:</p>
  
  <pre><code>File "snowflake/connector/cursor.py", line 631, in query_result
  
  self._init_result_and_meta(data, _use_ijson)
  
  File "snowflake/connector/cursor.py", line 591, in _init_result_and_meta
  
  for column in data[u'rowtype']:
  
  KeyError: u'rowtype'
  </code></pre>
  
  <p>Why would this error occur? How to solve this problem?</p>
  
  <hr>
  
  <p>Any recommendations? Thanks!</p>