Closed info-rchitect closed 1 year ago
BTW, I found a workaround to make the asynchronous queries work:
# This code is done in my Snowflake class
cursor.execute_async(statement)
job_id = cursor.sfqid
# The rest of the code is called within a function that is the target of a thread
# that is not joined so it does not block
polling2.poll(
lambda: connector.is_still_running(connector.get_query_status_throw_if_error(job_id)) == False,
step=5,
poll_forever=True
)
cursor.query_result(job_id) # This is the workaround. By putting this after a threaded polling function, it ensures that the results are available. The `query_result` function does not guarantee that like the `get_results_from_sfqid` function does
df = cursor.fetch_pandas_all()
To clean up and re-prioritize bugs and feature requests we are closing all issues older than 6 months as of March 1, 2023. If there are any issues or feature requests that you would like us to address, please re-create them. For urgent issues, opening a support case with this link Snowflake Community is the fastest way to get a response
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using (
python --version
)? 3.8.5What operating system and processor architecture are you using (
python -c 'import platform; print(platform.platform())'
)?Windows-10-10.0.19041-SP0
pip freeze
)?A pandas dataframe
Before I moved to
execute_async
I used this code to create my dataframe:However I cannot use the
from_records
function anymore becausecs
is adict
versus an object that has adescription
attribute.