Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
clickhouse avatar

Chdb Sql

  • 5.6k installs
  • 510 repo stars
  • Updated August 2, 2026
  • clickhouse/agent-skills

chdb-sql is an agent skill that apply chdb-sql agent skill workflows from documented skill.md guidance.

About

chdb-sql is an agent skill from clickhouse/agent-skills that apply chdb-sql agent skill workflows from documented skill.md guidance. # 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. ```bash pip install chdb ``` ## Decision Tree: Pick the Right API ``` 1. One-off query on files or databases → chdb.query() 2. Multi-step analysis with ta Developers invoke chdb-sql during build/integrations work for backend & apis tasks. The skill documents triggers, prerequisites, and step-by-step workflows grounded in SKILL.md. Compatible with Claude Code, Cursor, and Codex agent runtimes that load marketplace skills. Review the Security Audits panel on this listing before installing in production environments. Category Backend & APIs with development vertical focus supports repeatable agent-guided delivery.

  • 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 fu
  • Decision Tree: Pick the Right API
  • 1. One-off query on files or databases → chdb.query()
  • 2. Multi-step analysis with tables → Session

Chdb Sql by the numbers

  • 5,559 all-time installs (skills.sh)
  • +969 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #130 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

chdb-sql capabilities & compatibility

Capabilities
chdb sql — clickhouse in your python process · run clickhouse sql directly in python — no serve · decision tree: pick the right api · 1. one off query on files or databases → chdb.qu · 2. multi step analysis with tables → session
Use cases
orchestration
From the docs

What chdb-sql says it does

Run ClickHouse SQL directly in Python — no server needed. Query local files, remote databases, and cloud storage with full ClickHouse SQL power.
SKILL.md
1. One-off query on files or databases → chdb.query()
SKILL.md
2. Multi-step analysis with tables → Session
SKILL.md
npx skills add https://github.com/clickhouse/agent-skills --skill chdb-sql

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs5.6k
repo stars510
Security audit2 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryclickhouse/agent-skills

What it does

Apply chdb-sql agent skill workflows from documented SKILL.md guidance.

Who is it for?

Developers working on backend & apis during build tasks.

Skip if: Tasks outside Backend & APIs scope described in SKILL.md.

When should I use this skill?

Apply chdb-sql agent skill workflows from documented SKILL.md guidance.

What you get

Completed backend & apis workflow aligned with SKILL.md steps.

  • SQL query results
  • session analytical tables

By the numbers

  • Documents 9 self-contained runnable chdb SQL example sections

Files

SKILL.mdMarkdownGitHub ↗

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

Table functions → table-functions.md | SQL functions → sql-functions.md | Full API → api-reference.md

Session — Stateful Analysis Pipelines

from chdb import session as chs
sess = chs.Session("./analytics_db")   # persistent; Session() for in-memory

sess.query("CREATE TABLE users ENGINE=MergeTree() ORDER BY id AS SELECT * FROM mysql('db:3306','crm','users','root','pass')")
sess.query("CREATE TABLE events ENGINE=MergeTree() ORDER BY (ts,user_id) AS SELECT * FROM s3('s3://logs/events/*.parquet',NOSIGN)")
sess.query("""
    SELECT u.country, count() AS cnt, uniqExact(e.user_id) AS users
    FROM events e JOIN users u ON e.user_id = u.id
    WHERE e.ts >= today() - 7 GROUP BY u.country ORDER BY cnt DESC
""", "Pretty").show()
sess.close()

Connection API (DB-API 2.0)

from chdb import dbapi
conn = dbapi.connect()
cur = conn.cursor()
cur.execute("SELECT * FROM file('data.parquet', Parquet) WHERE value > 100")
print(cur.fetchall())
cur.close()
conn.close()

Troubleshooting

ProblemFix
ImportError: No module named 'chdb'pip install chdb
DB::Exception: FILE_NOT_FOUNDCheck file path; use absolute path or verify cwd
DB::Exception: Unknown table functionCheck function name spelling (e.g., deltaLake not deltalake)
Connection refused to remote DBCheck host:port format; ensure remote DB allows connections
Environment checkRun python scripts/verify_install.py (from skill directory)

References

  • API Reference — query/Session/connect signatures
  • Table Functions — All ClickHouse table functions
  • SQL Functions — Commonly used SQL functions
  • Examples — 9 runnable examples with expected output
  • Official Docs
Note: This skill teaches how to use chdb SQL.
For pandas-style operations, use the chdb-datastore skill.
For contributing to chdb source code, see CLAUDE.md in the project root.

Related skills

FAQ

What does chdb-sql do?

Apply chdb-sql agent skill workflows from documented SKILL.md guidance.

When should I use chdb-sql?

During build integrations work for backend & apis.

Is chdb-sql safe to install?

Review the Security Audits panel on this listing before production use.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.