SNOW-571450: fetch_pandas_all() yields an unknown error. _query_result_format seems to != 'arrow'
Please answer these questions before submitting your issue. Thanks!
-
What version of Python are you using?
3.9.5
-
What operating system and processor architecture are you using?
macOS-12.3-arm64-arm-64bit
- What are the component versions in the environment (
pip freeze)?
pyarrow==6.0.1 snowflake-connector-python==2.7.6 full requirements.txt attached req.txt
- What did you do?
` conn = snowflake.connector.connect( user=user, password=pwd, account=acc, warehouse=warehouse, database=db, schema=schema ) cs = conn.cursor()
cs.execute('select * from mappings_prod.mappings.brandmap') df = cs.fetch_pandas_all() `
- What did you expect to see?
df with data
- What did you see?
NotSupportedError Traceback (most recent call last) /var/folders/qw/yg514cqx2y7fg6h7ctnc2m8r0000gn/T/ipykernel_10069/420792028.py in
----> 1 df = cs.fetch_pandas_all() ~/.pyenv/versions/snowflake/lib/python3.9/site-packages/snowflake/connector/cursor.py in fetch_pandas_all(self, **kwargs) 972 self._prefetch_hook() 973 if self._query_result_format != "arrow": --> 974 raise NotSupportedError 975 self._log_telemetry_job_data( 976 TelemetryField.PANDAS_FETCH_ALL, TelemetryData.TRUE
NotSupportedError: Unknown error
- Can you set logging to DEBUG and collect the logs?
2022-04-07 11:41:42,898 - MainThread cursor.py:722 - execute() - DEBUG - sfqid: 01a371e5-0601-e38b-0011-f58303835152 2022-04-07 11:41:42,898 - MainThread cursor.py:722 - execute() - DEBUG - sfqid: 01a371e5-0601-e38b-0011-f58303835152 2022-04-07 11:41:42,899 - MainThread cursor.py:724 - execute() - INFO - query execution done 2022-04-07 11:41:42,899 - MainThread cursor.py:724 - execute() - INFO - query execution done 2022-04-07 11:41:42,900 - MainThread cursor.py:726 - execute() - DEBUG - SUCCESS 2022-04-07 11:41:42,900 - MainThread cursor.py:726 - execute() - DEBUG - SUCCESS 2022-04-07 11:41:42,901 - MainThread cursor.py:729 - execute() - DEBUG - PUT OR GET: None 2022-04-07 11:41:42,901 - MainThread cursor.py:729 - execute() - DEBUG - PUT OR GET: None 2022-04-07 11:41:42,902 - MainThread cursor.py:826 - _init_result_and_meta() - DEBUG - Query result format: json 2022-04-07 11:41:42,902 - MainThread cursor.py:826 - _init_result_and_meta() - DEBUG - Query result format: json 2022-04-07 11:41:42,903 - MainThread result_batch.py:446 - _parse() - DEBUG - parsing for result batch id: 10 2022-04-07 11:41:42,903 - MainThread result_batch.py:446 - _parse() - DEBUG - parsing for result batch id: 10
Same here. Looks like arrow_iterator.cpython-39-darwin.so has only been built for intel not arm:
$ python -c 'from snowflake.connector.arrow_iterator import PyArrowIterator'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: dlopen(/Users/tekumara/code/app/.venv/lib/python3.9/site-packages/snowflake/connector/arrow_iterator.cpython-39-darwin.so, 0x0002): tried: '/Users/tekumara/code/app/.venv/lib/python3.9/site-packages/snowflake/connector/arrow_iterator.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
Same here. Python 3.9.7 macOS-12.1-arm64-arm-64bit
Run
pip install 'snowflake-connector-python[pandas]'
See https://github.com/snowflakedb/snowflake-connector-python/issues/986#issuecomment-1115354587 which is a duplicate
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