Technical & DevelopmentIntermediate
chdb-sql
In-process ClickHouse SQL engine for Python without a server.
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/ClickHouse/agent-skills --skill chdb-sqlnpx skills add https://github.com/ClickHouse/agent-skills --skill chdb-sqlOr paste this URL into your assistant to install:
Overview
What This Skill Does
Runs ClickHouse SQL queries directly inside your Python process on local files, remote databases, and cloud storage.
Application
When to use this Skill
- Running ClickHouse SQL queries directly in Python without setting up a server.
- Querying parquet/CSV/JSON files on cloud object storage (S3) or databases.
- Configuring stateful analytical pipelines utilizing ClickHouse session storage.
- Binding query parameters dynamically in Python DB-API 2.0 database interfaces.
- Optimizing multi-source joins across files and databases using raw SQL syntax.
Documentation
Show Skills.md file
chdb SQL — ClickHouse in Your Python Process
Run ClickHouse SQL directly in Python — no server needed. Query local files, remote databases, and cloud storage with full ClickHouse SQL power.
pip install chdb
Decision Tree: Pick the Right API
1. One-off query on files or databases → chdb.query()
2. Multi-step analysis with tables → Session
3. DB-API 2.0 connection → chdb.connect()
4. Pandas-style DataFrame operations → Use chdb-datastore skill instead
chdb.query() — One Line, Any Data
import chdb
chdb.query("SELECT * FROM file('data.parquet', Parquet) WHERE price > 100 LIMIT 10") # local files
chdb.query("SELECT * FROM mysql('db:3306', 'shop', 'orders', 'root', 'pass')") # databases
chdb.query("SELECT * FROM s3('s3://bucket/data.parquet', NOSIGN) LIMIT 10") # cloud storage
chdb.query("SELECT * FROM deltaLake('s3://bucket/delta/table', NOSIGN) LIMIT 10") # data lakes
# Cross-source join
chdb.query("""
SELECT u.name, o.amount FROM mysql('db:3306', 'crm', 'users', 'root', 'pass') AS u
JOIN file('orders.parquet', Parquet) AS o ON u.id = o.user_id ORDER BY o.amount DESC
""")
data = {"name": ["Alice", "Bob"], "score": [95, 87]}
chdb.query("SELECT * FROM Python(data) ORDER BY score DESC") # Python data
df = chdb.query("SELECT * FROM numbers(10)", "DataFrame") # output formats
chdb.query("SELECT toDate({d:String}) + number FROM numbers({n:UInt64})",
"DataFrame", params={"d": "2025-01-01", "n": 30}) # parametrized
Lines 1 - 39 of 91
Recommendations
Explore other random skills
TechnicalIntermediate
angular-new-app
Creates a new Angular app using the Angular CLI. This skill should be used whenever a user wants to create a new Angular application and contains important guidelines for how to effectively create a modern Angular application.
TechnicalIntermediate
content-experimentation-best-practices
Content A/B testing and experimentation workflows
TechnicalIntermediate
seo-aeo-best-practices
SEO and answer engine optimization patterns for content sites