Closed avriiil closed 2 years ago
Additionally I can confirm that the code below does work
# create Snowflake Python connector
ctx = snowflake.connector.connect(
user=os.environ["SNOWFLAKE_USER"],
password=os.environ["SNOWFLAKE_PASSWORD"],
account=os.environ["SNOWFLAKE_ACCOUNT"],
)
# run sample code to test connection
cs = ctx.cursor()
schema = "TPCDS_SF100TCL"
table = "CALL_CENTER"
cs.execute("USE SNOWFLAKE_SAMPLE_DATA")
cs.execute("SELECT * FROM " + schema + "." + table)
one_row = str(cs.fetchone())
print(one_row)
The function _fetch_batch
was only introduced in 0.1.0
and was called differently before. Can you please verify that the cluster and the client are running the same version of dask-snowflake
?
Additionally, it would be helpful to check if there are any other errors, e.g. in the dask Worker logs
@fjetter -- the cluster was indeed running an old version of dask-snowflake
. Updated and that solved the issue, thanks!
Trying to read data from Snowflake using
read_snowflake
is throwing anAttributeError: Can't get attribute '_fetch_batch' on <module 'dask_snowflake.core' from '/opt/conda/envs/coiled/lib/python3.9/site-packages/dask_snowflake/core.py'>
The code I'm running:
I'm running:
dask-snowflake 0.1.0
dask/distributed 2022.02.1
I've tried connecting to my personal Snowflake account instead of the Coiled account and I get the same error. @fjetter -- any idea what could be going wrong here?
Full Traceback: