chdb
chDB is an in-process OLAP SQL Engine 🚀 powered by ClickHouse
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
â—‹CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
â—‹DOI references
-
â—‹Academic publication links
-
â—‹Committers with academic emails
-
â—‹Institutional organization owner
-
â—‹JOSS paper metadata
-
â—‹Scientific vocabulary similarity
Low similarity (11.3%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
chDB is an in-process OLAP SQL Engine 🚀 powered by ClickHouse
Basic Info
- Host: GitHub
- Owner: chdb-io
- License: apache-2.0
- Language: C++
- Default Branch: main
- Homepage: https://clickhouse.com/chdb
- Size: 874 MB
Statistics
- Stars: 2,455
- Watchers: 34
- Forks: 85
- Open Issues: 53
- Releases: 0
Topics
Metadata Files
README-zh.md
chDB
chDB ClickHouse SQL OLAP chDB: ClickHouse as a Function
- Python SQL OLAP ClickHouse
- ClickHouse
- ParquetCSVJSONArrowORC 60
- Python DB API 2.0 , example
chDB macOSx86_64 ARM64 Linux Python 3.8+
bash
pip install chdb
python3 -m chdb SQL [OutputFormat]bash python3 -m chdb "SELECT 1,'abc'" Pretty
chdb DB-API
ParquetCSVJSONArrowORC 60
SQL
python
import chdb
res = chdb.query('select version()', 'Pretty'); print(res)
Parquet CSV
```python
tests/format_output.py
res = chdb.query('select * from file("data.parquet", Parquet)', 'JSON'); print(res) res = chdb.query('select * from file("data.csv", CSV)', 'CSV'); print(res) print(f"SQL read {res.rowsread()} rows, {res.bytesread()} bytes, elapsed {res.elapsed()} seconds") ```
Pandas DataFrame
```python
https://clickhouse.com/docs/en/interfaces/formats
chdb.query('select * from file("data.parquet", Parquet)', 'Dataframe') ```
Pandas DataFrameParquet /Arrow /
### Pandas DataFrame
```python
import chdb.dataframe as cdf
import pandas as pd
# Join 2 DataFrames
df1 = pd.DataFrame({'a': [1, 2, 3], 'b': ["one", "two", "three"]})
df2 = pd.DataFrame({'c': [1, 2, 3], 'd': ["", "", ""]})
ret_tbl = cdf.query(sql="select * from __tbl1__ t1 join __tbl2__ t2 on t1.a = t2.c",
tbl1=df1, tbl2=df2)
print(ret_tbl)
# Query on the DataFrame Table
print(ret_tbl.query('select b, sum(a) from __table__ group by b'))
```
Session
```python
from chdb import session as chs
## DB, Table, View
sess = chs.Session()
sess.query("CREATE DATABASE IF NOT EXISTS db_xxx ENGINE = Atomic")
sess.query("CREATE TABLE IF NOT EXISTS db_xxx.log_table_xxx (x String, y Int) ENGINE = Log;")
sess.query("INSERT INTO db_xxx.log_table_xxx VALUES ('a', 1), ('b', 3), ('c', 2), ('d', 5);")
sess.query(
"CREATE VIEW db_xxx.view_xxx AS SELECT * FROM db_xxx.log_table_xxx LIMIT 4;"
)
print("Select from view:\n")
print(sess.query("SELECT * FROM db_xxx.view_xxx", "Pretty"))
```
: [test_stateful.py](tests/test_stateful.py)
Python DB-API 2.0
```python
import chdb.dbapi as dbapi
print("chdb driver version: {0}".format(dbapi.get_client_info()))
conn1 = dbapi.connect()
cur1 = conn1.cursor()
cur1.execute('select version()')
print("description: ", cur1.description)
print("data: ", cur1.fetchone())
cur1.close()
conn1.close()
```
Query with UDF(User Defined Functions)
```python
from chdb.udf import chdb_udf
from chdb import query
@chdb_udf()
def sum_udf(lhs, rhs):
return int(lhs) + int(rhs)
print(query("select sum_udf(12,22)"))
```
: [test_udf.py](tests/test_udf.py).
- SQL ClickHouse SQL
- Star
- [ ]
- [ ]
- [ ]
- Demo chDB at ClickHouse v23.7 livehouse! and Slides
Apache 2.0 LICENSE
chDB ClickHouse chDB
- : @auxten
- Discordhttps://discord.gg/D2Daa2fM5K
- auxten@clickhouse.com
- Twitter@chdb
Owner
- Name: chdb-io
- Login: chdb-io
- Kind: organization
- Repositories: 1
- Profile: https://github.com/chdb-io
GitHub Events
Total
- Create event: 23
- Release event: 8
- Issues event: 51
- Watch event: 416
- Issue comment event: 124
- Push event: 95
- Pull request review comment event: 9
- Pull request review event: 13
- Pull request event: 78
- Fork event: 20
Last Year
- Create event: 23
- Release event: 8
- Issues event: 51
- Watch event: 416
- Issue comment event: 124
- Push event: 95
- Pull request review comment event: 9
- Pull request review event: 13
- Pull request event: 78
- Fork event: 20
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| auxten | a****c@g****m | 1,079 |
| Daniel-Robbins | e****s@g****m | 180 |
| Lorenzo Mangani | l****i@g****m | 72 |
| nmreadelf | f****g@h****m | 36 |
| Yunyu Lin | m****l@y****n | 22 |
| allcontributors[bot] | 4****] | 20 |
| wudidapaopao | x****u@c****m | 17 |
| Nevin | n****1@g****m | 6 |
| laodouya | l****a@y****t | 6 |
| reema93jain | 1****n | 2 |
| Alex Bocharov | a****x@x****i | 1 |
| DemoYeti | 1****i | 1 |
| Michael Eastham | m****m@g****m | 1 |
| xinhuitian | x****n@1****m | 1 |
| Michael Razuvaev | r****v@y****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 141
- Total pull requests: 249
- Average time to close issues: about 2 months
- Average time to close pull requests: 10 days
- Total issue authors: 71
- Total pull request authors: 16
- Average comments per issue: 2.52
- Average comments per pull request: 0.51
- Merged pull requests: 198
- Bot issues: 0
- Bot pull requests: 6
Past Year
- Issues: 42
- Pull requests: 88
- Average time to close issues: 24 days
- Average time to close pull requests: 4 days
- Issue authors: 27
- Pull request authors: 6
- Average comments per issue: 1.48
- Average comments per pull request: 0.2
- Merged pull requests: 65
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- auxten (16)
- danthegoodman1 (9)
- lmangani (7)
- yidigo (6)
- djouallah (6)
- wonb168 (5)
- arnaudbriche (4)
- blackrez (4)
- LPauzies (4)
- DanielMao1 (3)
- l1t1 (3)
- jovezhong (2)
- agoncear-mwb (2)
- zhuzhuyan93 (2)
- nalgeon (2)
Pull Request Authors
- auxten (136)
- wudidapaopao (39)
- nmreadelf (21)
- Daniel-Robbins (15)
- lmangani (10)
- allcontributors[bot] (6)
- yunyu (4)
- reema93jain (3)
- DemoYeti (2)
- xinhuitian (2)
- bocharov (2)
- agoncear-mwb (2)
- nevinpuri (2)
- laodouya (2)
- meastham (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 908,210 last-month
- Total docker downloads: 5,783
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 2
(may contain duplicates) - Total versions: 129
- Total maintainers: 1
proxy.golang.org: github.com/chdb-io/chdb
- Homepage: https://github.com/chdb-io/chdb
- Documentation: https://pkg.go.dev/github.com/chdb-io/chdb#section-documentation
- License: Apache-2.0
-
Latest release: v3.5.0+incompatible
published 7 months ago
Rankings
pypi.org: chdb
chDB is an in-process SQL OLAP Engine powered by ClickHouse
- Homepage: https://github.com/chdb-io/chdb
- Documentation: https://clickhouse.com/docs/en/chdb
- License: Apache-2.0
-
Latest release: 3.5.0
published 7 months ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/chdb-io/chdb/chdb/golang
- Homepage: https://github.com/chdb-io/chdb
- Documentation: https://pkg.go.dev/github.com/chdb-io/chdb/chdb/golang#section-documentation
- License: apache-2.0
-
Latest release: v0.0.0-20231222131240-d44a75f881c0
published about 2 years ago