1

Trying to read the results of a query (from an AWS athena database) to a dask dataframe. Following the read_sql_query method of the official documentation.

Here is how I am calling it.

from dask import dataframe
query:sqlalchemy.Query
engine:sqlalchemy.Engine

dataframe.read_sql_query(sql=query.statement, con=str(engine.url), index_col='date') # AttributeError: 'OptionEngine' object has no attribute 'execute'

So, why this AttributeError when the documentation says I have to pass a string for the con argument? Should it be some other string? Note that the query is working fine without dask, so the database configuration parameters are alright.

Also, I am looking for a read method that can scale to a multinode dask cluster without having to collect all the results at the driver node.

1
  • Hi, could you post the complete stack trace of the exception? Commented Dec 22, 2023 at 15:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.