All skills
clickhouse avatar

/chdb-sql

@46ef08c official
by clickhouseclickhouse/agent-skills543 stars
39

Use when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake) without setting up a server. Provides chDB — embedded ClickHouse SQL in Python with 1000+ functions, Session for stateful multi-step pipelines, parametrized queries, and cross-source joins via `s3()`, `mysql()`, `postgresql()`, `iceberg()`, `deltaLake()`, `remoteSecure()` table functions. TRIGGER when: user wants SQL on parquet/csv/files or across remote analytical sources; uses ClickHouse SQL features (window functions, windowFunnel, geoToH3, JSON path ops, Session, parametrized queries); imports `chdb` or calls `chdb.query()`. SKIP this skill for pandas-style DataFrame method-chaining (use chdb-datastore instead) or ClickHouse server administration.

Use this Skill: https://skilld.dev/gh/clickhouse/agent-skills/chdb-sql

This session only. Nothing lands on disk.

README.md

≈312 tokens on demand. Your agent reads this file only when SKILL.md points to it.

chdb SQL

Agent skill for using chdb's SQL API — run ClickHouse SQL directly in Python without a server.

Installation

npx skills add clickhouse/agent-skills

What's Included

File Purpose
SKILL.md Skill definition with quick-start examples
references/api-reference.md chdb.query(), Session, Connection signatures
references/table-functions.md All ClickHouse table functions (file, s3, mysql, etc.)
references/sql-functions.md Commonly used ClickHouse SQL functions
examples/examples.md 9 runnable examples with expected output
scripts/verify_install.py Environment verification script

Trigger Phrases

This skill activates when you:

  • "Query this Parquet/CSV file with SQL"
  • "Use chdb to run a query"
  • "Join MySQL and S3 data with SQL"
  • "Create a ClickHouse session"
  • "Use ClickHouse table functions"
  • "Write a parametrized query"

Related

  • chdb-datastore — For pandas-style DataFrame operations, use the chdb-datastore skill instead
  • clickhouse-best-practices — For ClickHouse schema/query optimization

Documentation

Source: SKILL.md on GitHub

1 warning17d4 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The skill provides instructions and references for 'chdb', an official in-process ClickHouse SQL engine by ClickHouse Inc. It allows the agent to run analytical SQL queries on local files (CSV, Parquet, JSON), remote databases (MySQL, Postgres, MongoDB), and cloud storage (S3, GCS). All identified library dependencies and remote sources are standard components of the ClickHouse ecosystem.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: MEDIUM · 1 issue

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 46ef08c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 4 months ago
compatibility
Requires Python 3.9+, macOS or Linux. pip install chdb.
Other metadata
metadata
{
  "author": "chdb-io",
  "version": "4.1",
  "homepage": "https://clickhouse.com/docs/chdb"
}
  • Python
  • clickhouse
  • chdb
  • sql
  • analytics
  • parquet
  • csv
  • s3
  • postgres
  • mysql
  • mongodb
  • data-lakes

README badge

README badge for clickhouse/agent-skills/chdb-sql

Runs ClickHouse SQL directly in Python against local files (parquet, CSV, JSON), remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud), and data lakes (Iceberg, Delta Lake) without a server. Use for analytical queries with window functions, cross-source joins, and parametrized statements via chdb.query() or Session for stateful pipelines.

Generated from the current SKILL.md.

Does chdb require a running ClickHouse server?
No. chdb is embedded ClickHouse SQL that runs directly in your Python process without needing a server.
What remote data sources can I query?
Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake, S3, and local files (parquet, CSV, JSON).
Can I join data across different sources in a single query?
Yes. You can use table functions like `mysql()`, `postgresql()`, `s3()`, and `deltaLake()` together in cross-source JOINs.
What Python versions does this support?
Python 3.9 and later on macOS or Linux.
Does this work for pandas-style DataFrame operations?
No. For method-chaining DataFrame workflows, use the chdb-datastore skill instead.

Generated from the current SKILL.md. These answers refresh after source changes.