chDB is an in-process SQL OLAP Engine powered by ClickHouse
- In-process SQL OLAP Engine, powered by ClickHouse
- No need to install ClickHouse
- Minimized data copy from C++ to Python with python memoryview
- Input&Output support Parquet, CSV, JSON, Arrow, ORC and more
Currently, chDB only supports Python 3.7+ on macOS(x86_64 and ARM64) and Linux.
pip install chdb
Currently, chDB only supports query
function, which is used to execute SQL and return desired format data.
import chdb
res = chdb.query('select version()', 'CSV'); print(str(res.get_memview().tobytes()))
chdb.query('select * from file("data.parquet", Parquet)', 'CSV')
chdb.query('select * from file("data.csv", CSV)', 'CSV')
chdb.query('select * from file("data.parquet", Parquet)', 'Dataframe')
more examples, please refer to examples
- For SQL syntax, please refer to ClickHouse SQL Reference
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. There are something you can help:
- Report bugs on GitHub Issues.
- Help me with Windows support, I don't know much about Windows toolchain.
- The Python Wrapper just have a
query
function. I want to add more functions to make it more convenient to use. liketoPandas
,toNumpy
and so on.
AGPL-v3.0 or Commercial License, see LICENSE for more information.
chDB is mainly based on ClickHouse for trade mark and other reasons, I named it chDB.
- Email: [email protected]
- Twitter: @auxten