You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What operating system and processor architecture are you using?
Linux-5.10.47-linuxkit-x86_64-with-glibc2.31
What are the component versions in the environment (pip freeze)?
Built wheel using:
ci/build_docker.sh
which generates
snowflake_connector_python-2.7.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
What did you do?
Create a DB with json data.
I check that it is being stored in a JSON friendly format because i can query the data using : dotted access
cursor=ctx.cursor().execute(f""" SELECT * FROM MYDATASET.PUBLIC.MYTABLE_VARIANT WHERE DATA:jsonPayload:bytes_sent > 3500 LIMIT 2 """)
result=cursor.fetch_pandas_all()
print(type(result['DATA'].iloc[0]), result['DATA'].iloc[0])
I expected that the dataframe column for DATA would automatically convert to JSON, in this case: <class 'dict'>.
If I use the Snowflake UI, I can copy the DATA column and it pastes as JSON. It also displays as JSON.
Can you set logging to DEBUG and collect the logs?
I don't think this is necessary since this is less a bug than a feature request. However, i marked it as a bug because I think it is a bug with respected to everybody's expectation of how it would work, and related to the many issues raised over fetch_pandas_all() not respecting schema.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
fetch_pandas_all returns JSON columns as string not dict
SNOW-584971: fetch_pandas_all returns JSON columns as string not dict
May 3, 2022
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
I believe this is similar to several other issues and PRs:
python 3.9.7
Linux-5.10.47-linuxkit-x86_64-with-glibc2.31
What are the component versions in the environment (
pip freeze
)?Built wheel using:
ci/build_docker.sh
which generates
snowflake_connector_python-2.7.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
What did you do?
Create a DB with json data.
I check that it is being stored in a JSON friendly format because i can query the data using
:
dotted accessThe output shows that it is <class 'str'>.
I expected that the dataframe column for DATA would automatically convert to JSON, in this case: <class 'dict'>.
If I use the Snowflake UI, I can copy the DATA column and it pastes as JSON. It also displays as JSON.
I don't think this is necessary since this is less a bug than a feature request. However, i marked it as a bug because I think it is a bug with respected to everybody's expectation of how it would work, and related to the many issues raised over fetch_pandas_all() not respecting schema.
The text was updated successfully, but these errors were encountered: