chDB is an embedded SQL OLAP engine powered by ClickHouse.


  • SQL OLAP engine embedded in Python, powered by ClickHouse
  • No need to install ClickHouse
  • Supports Parquet, CSV, JSON, Arrow, ORC, and more than 60 other formatsinput Output,example.

Currently, chDB only supports Python 3.7+ on macOS (x86_64 and ARM64) and Linux.


run on the command line

python3 -m chdb SQL [OutputFormat]

python3 -m chdb "SELECT 1,'abc'" Pretty

Currently, chDB only supports query A function that executes SQL and returns data in the desired format.

import chdb
res = chdb.query('select version()', 'Pretty'); print(

Use Parquet or CSV

# 查看更多数据类型格式,请参见 tests/
res = chdb.query('select * from file("data.parquet", Parquet)', 'JSON'); print(
# 对于大型数据结果,get_memview() 更快,因为它不需要额外的数据复制。
res = chdb.query('select * from file("data.csv", CSV)', 'CSV');  print(str(res.get_memview().tobytes()))

Pandas DataFrame output

# 更多内容请参见
chdb.query('select * from file("data.parquet", Parquet)', 'Dataframe')

#chDB #Homepage #Documentation #Download #Embedded #SQL #OLAP #Engine #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *