Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clickhouse Asynchronous I/O #278

Closed
ArijitSinghEDA opened this issue Dec 13, 2023 · 1 comment · Fixed by #323
Closed

Clickhouse Asynchronous I/O #278

ArijitSinghEDA opened this issue Dec 13, 2023 · 1 comment · Fixed by #323

Comments

@ArijitSinghEDA
Copy link

I have a sql query: SELECT * FROM TABLE1
The table is stored in a Clickhouse database.

I am running the following code:

from sqlalchemy import text
from sqlalchemy.ext.asyncio import create_async_engine

engine = create_async_engine("clickhouse+asynch://host/db")

async with engine.connect() as conn:
    res = await conn.stream(text(query))
    data = await res.partitions(10000)

This results into the following error:

asynch.errors.ServerException: Code: 12.
DB::Exception: Setting 'max_block_size' cannot be zero

What am I doing wrong? My objective is to get data in parallel

@Simon-Chenzw
Copy link
Contributor

Asynch may already support this feature in version 0.2.4.
But clickhouse-sqlalchemy still needs some changes.
see long2ice/asynch#24

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants