[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-clickhouse-chdb-sql":3,"mdc--9ih9i1-key":38,"related-org-clickhouse-chdb-sql":718,"related-repo-clickhouse-chdb-sql":910},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":33,"sourceUrl":36,"mdContent":37},"chdb-sql","run ClickHouse SQL queries in Python","Use when the user wants to run SQL — especially analytical SQL — on local files (parquet\u002Fcsv\u002Fjson), 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\u002Fcsv\u002Ffiles 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.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"clickhouse","ClickHouse","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fclickhouse.png",[12,14,17,20,23],{"name":9,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"Data Engineering","data-engineering",{"name":18,"slug":19,"type":13},"Data Analysis","data-analysis",{"name":21,"slug":22,"type":13},"Python","python",{"name":24,"slug":25,"type":13},"SQL","sql",493,"https:\u002F\u002Fgithub.com\u002FClickHouse\u002Fagent-skills","2026-04-15T04:56:33.299509","Apache-2.0",32,[32,8],"agents",{"repoUrl":27,"stars":26,"forks":30,"topics":34,"description":35},[32,8],"The official Agent Skills for ClickHouse and ClickHouse Cloud","https:\u002F\u002Fgithub.com\u002FClickHouse\u002Fagent-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fchdb-sql","---\nname: chdb-sql\ndescription: >-\n  Use when the user wants to run SQL — especially analytical SQL — on\n  local files (parquet\u002Fcsv\u002Fjson), URLs, S3 paths, or remote databases\n  (Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake)\n  without setting up a server. Provides chDB — embedded ClickHouse SQL\n  in Python with 1000+ functions, Session for stateful multi-step\n  pipelines, parametrized queries, and cross-source joins via `s3()`,\n  `mysql()`, `postgresql()`, `iceberg()`, `deltaLake()`, `remoteSecure()`\n  table functions.\n  TRIGGER when: user wants SQL on parquet\u002Fcsv\u002Ffiles or across remote\n  analytical sources; uses ClickHouse SQL features (window functions,\n  windowFunnel, geoToH3, JSON path ops, Session, parametrized queries);\n  imports `chdb` or calls `chdb.query()`.\n  SKIP this skill for pandas-style DataFrame method-chaining (use\n  chdb-datastore instead) or ClickHouse server administration.\nlicense: Apache-2.0\ncompatibility: Requires Python 3.9+, macOS or Linux. pip install chdb.\nmetadata:\n  author: chdb-io\n  version: \"4.1\"\n  homepage: https:\u002F\u002Fclickhouse.com\u002Fdocs\u002Fchdb\n---\n\n# chdb SQL — ClickHouse in Your Python Process\n\nRun ClickHouse SQL directly in Python — no server needed. Query local files, remote databases, and cloud storage with full ClickHouse SQL power.\n\n```bash\npip install chdb\n```\n\n## Decision Tree: Pick the Right API\n\n```\n1. One-off query on files or databases → chdb.query()\n2. Multi-step analysis with tables      → Session\n3. DB-API 2.0 connection                → chdb.connect()\n4. Pandas-style DataFrame operations    → Use chdb-datastore skill instead\n```\n\n## chdb.query() — One Line, Any Data\n\n```python\nimport chdb\n\nchdb.query(\"SELECT * FROM file('data.parquet', Parquet) WHERE price > 100 LIMIT 10\")       # local files\nchdb.query(\"SELECT * FROM mysql('db:3306', 'shop', 'orders', 'root', 'pass')\")              # databases\nchdb.query(\"SELECT * FROM s3('s3:\u002F\u002Fbucket\u002Fdata.parquet', NOSIGN) LIMIT 10\")                 # cloud storage\nchdb.query(\"SELECT * FROM deltaLake('s3:\u002F\u002Fbucket\u002Fdelta\u002Ftable', NOSIGN) LIMIT 10\")           # data lakes\n\n# Cross-source join\nchdb.query(\"\"\"\n    SELECT u.name, o.amount FROM mysql('db:3306', 'crm', 'users', 'root', 'pass') AS u\n    JOIN file('orders.parquet', Parquet) AS o ON u.id = o.user_id ORDER BY o.amount DESC\n\"\"\")\n\ndata = {\"name\": [\"Alice\", \"Bob\"], \"score\": [95, 87]}\nchdb.query(\"SELECT * FROM Python(data) ORDER BY score DESC\")                                # Python data\ndf = chdb.query(\"SELECT * FROM numbers(10)\", \"DataFrame\")                                   # output formats\nchdb.query(\"SELECT toDate({d:String}) + number FROM numbers({n:UInt64})\",\n    \"DataFrame\", params={\"d\": \"2025-01-01\", \"n\": 30})                                      # parametrized\n```\n\nTable functions → [table-functions.md](references\u002Ftable-functions.md) | SQL functions → [sql-functions.md](references\u002Fsql-functions.md) | Full API → [api-reference.md](references\u002Fapi-reference.md)\n\n## Session — Stateful Analysis Pipelines\n\n```python\nfrom chdb import session as chs\nsess = chs.Session(\".\u002Fanalytics_db\")   # persistent; Session() for in-memory\n\nsess.query(\"CREATE TABLE users ENGINE=MergeTree() ORDER BY id AS SELECT * FROM mysql('db:3306','crm','users','root','pass')\")\nsess.query(\"CREATE TABLE events ENGINE=MergeTree() ORDER BY (ts,user_id) AS SELECT * FROM s3('s3:\u002F\u002Flogs\u002Fevents\u002F*.parquet',NOSIGN)\")\nsess.query(\"\"\"\n    SELECT u.country, count() AS cnt, uniqExact(e.user_id) AS users\n    FROM events e JOIN users u ON e.user_id = u.id\n    WHERE e.ts >= today() - 7 GROUP BY u.country ORDER BY cnt DESC\n\"\"\", \"Pretty\").show()\nsess.close()\n```\n\n## Connection API (DB-API 2.0)\n\n```python\nfrom chdb import dbapi\nconn = dbapi.connect()\ncur = conn.cursor()\ncur.execute(\"SELECT * FROM file('data.parquet', Parquet) WHERE value > 100\")\nprint(cur.fetchall())\ncur.close()\nconn.close()\n```\n\n## Troubleshooting\n\n| Problem | Fix |\n|---------|-----|\n| `ImportError: No module named 'chdb'` | `pip install chdb` |\n| `DB::Exception: FILE_NOT_FOUND` | Check file path; use absolute path or verify cwd |\n| `DB::Exception: Unknown table function` | Check function name spelling (e.g., `deltaLake` not `deltalake`) |\n| Connection refused to remote DB | Check host:port format; ensure remote DB allows connections |\n| Environment check | Run `python scripts\u002Fverify_install.py` (from skill directory) |\n\n## References\n\n- [API Reference](references\u002Fapi-reference.md) — query\u002FSession\u002Fconnect signatures\n- [Table Functions](references\u002Ftable-functions.md) — All ClickHouse table functions\n- [SQL Functions](references\u002Fsql-functions.md) — Commonly used SQL functions\n- [Examples](examples\u002Fexamples.md) — 9 runnable examples with expected output\n- [Official Docs](https:\u002F\u002Fclickhouse.com\u002Fdocs\u002Fchdb)\n\n> Note: This skill teaches how to *use* chdb SQL.\n> For pandas-style operations, use the `chdb-datastore` skill.\n> For contributing to chdb source code, see CLAUDE.md in the project root.\n",{"data":39,"body":45},{"name":4,"description":6,"license":29,"compatibility":40,"metadata":41},"Requires Python 3.9+, macOS or Linux. pip install chdb.",{"author":42,"version":43,"homepage":44},"chdb-io","4.1","https:\u002F\u002Fclickhouse.com\u002Fdocs\u002Fchdb",{"type":46,"children":47},"root",[48,57,63,98,105,115,121,289,317,323,417,423,486,492,625,631,687,712],{"type":49,"tag":50,"props":51,"children":53},"element","h1",{"id":52},"chdb-sql-clickhouse-in-your-python-process",[54],{"type":55,"value":56},"text","chdb SQL — ClickHouse in Your Python Process",{"type":49,"tag":58,"props":59,"children":60},"p",{},[61],{"type":55,"value":62},"Run ClickHouse SQL directly in Python — no server needed. Query local files, remote databases, and cloud storage with full ClickHouse SQL power.",{"type":49,"tag":64,"props":65,"children":70},"pre",{"className":66,"code":67,"language":68,"meta":69,"style":69},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pip install chdb\n","bash","",[71],{"type":49,"tag":72,"props":73,"children":74},"code",{"__ignoreMap":69},[75],{"type":49,"tag":76,"props":77,"children":80},"span",{"class":78,"line":79},"line",1,[81,87,93],{"type":49,"tag":76,"props":82,"children":84},{"style":83},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[85],{"type":55,"value":86},"pip",{"type":49,"tag":76,"props":88,"children":90},{"style":89},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[91],{"type":55,"value":92}," install",{"type":49,"tag":76,"props":94,"children":95},{"style":89},[96],{"type":55,"value":97}," chdb\n",{"type":49,"tag":99,"props":100,"children":102},"h2",{"id":101},"decision-tree-pick-the-right-api",[103],{"type":55,"value":104},"Decision Tree: Pick the Right API",{"type":49,"tag":64,"props":106,"children":110},{"className":107,"code":109,"language":55},[108],"language-text","1. One-off query on files or databases → chdb.query()\n2. Multi-step analysis with tables      → Session\n3. DB-API 2.0 connection                → chdb.connect()\n4. Pandas-style DataFrame operations    → Use chdb-datastore skill instead\n",[111],{"type":49,"tag":72,"props":112,"children":113},{"__ignoreMap":69},[114],{"type":55,"value":109},{"type":49,"tag":99,"props":116,"children":118},{"id":117},"chdbquery-one-line-any-data",[119],{"type":55,"value":120},"chdb.query() — One Line, Any Data",{"type":49,"tag":64,"props":122,"children":125},{"className":123,"code":124,"language":22,"meta":69,"style":69},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import chdb\n\nchdb.query(\"SELECT * FROM file('data.parquet', Parquet) WHERE price > 100 LIMIT 10\")       # local files\nchdb.query(\"SELECT * FROM mysql('db:3306', 'shop', 'orders', 'root', 'pass')\")              # databases\nchdb.query(\"SELECT * FROM s3('s3:\u002F\u002Fbucket\u002Fdata.parquet', NOSIGN) LIMIT 10\")                 # cloud storage\nchdb.query(\"SELECT * FROM deltaLake('s3:\u002F\u002Fbucket\u002Fdelta\u002Ftable', NOSIGN) LIMIT 10\")           # data lakes\n\n# Cross-source join\nchdb.query(\"\"\"\n    SELECT u.name, o.amount FROM mysql('db:3306', 'crm', 'users', 'root', 'pass') AS u\n    JOIN file('orders.parquet', Parquet) AS o ON u.id = o.user_id ORDER BY o.amount DESC\n\"\"\")\n\ndata = {\"name\": [\"Alice\", \"Bob\"], \"score\": [95, 87]}\nchdb.query(\"SELECT * FROM Python(data) ORDER BY score DESC\")                                # Python data\ndf = chdb.query(\"SELECT * FROM numbers(10)\", \"DataFrame\")                                   # output formats\nchdb.query(\"SELECT toDate({d:String}) + number FROM numbers({n:UInt64})\",\n    \"DataFrame\", params={\"d\": \"2025-01-01\", \"n\": 30})                                      # parametrized\n",[126],{"type":49,"tag":72,"props":127,"children":128},{"__ignoreMap":69},[129,137,147,156,165,174,183,191,200,209,218,227,236,244,253,262,271,280],{"type":49,"tag":76,"props":130,"children":131},{"class":78,"line":79},[132],{"type":49,"tag":76,"props":133,"children":134},{},[135],{"type":55,"value":136},"import chdb\n",{"type":49,"tag":76,"props":138,"children":140},{"class":78,"line":139},2,[141],{"type":49,"tag":76,"props":142,"children":144},{"emptyLinePlaceholder":143},true,[145],{"type":55,"value":146},"\n",{"type":49,"tag":76,"props":148,"children":150},{"class":78,"line":149},3,[151],{"type":49,"tag":76,"props":152,"children":153},{},[154],{"type":55,"value":155},"chdb.query(\"SELECT * FROM file('data.parquet', Parquet) WHERE price > 100 LIMIT 10\")       # local files\n",{"type":49,"tag":76,"props":157,"children":159},{"class":78,"line":158},4,[160],{"type":49,"tag":76,"props":161,"children":162},{},[163],{"type":55,"value":164},"chdb.query(\"SELECT * FROM mysql('db:3306', 'shop', 'orders', 'root', 'pass')\")              # databases\n",{"type":49,"tag":76,"props":166,"children":168},{"class":78,"line":167},5,[169],{"type":49,"tag":76,"props":170,"children":171},{},[172],{"type":55,"value":173},"chdb.query(\"SELECT * FROM s3('s3:\u002F\u002Fbucket\u002Fdata.parquet', NOSIGN) LIMIT 10\")                 # cloud storage\n",{"type":49,"tag":76,"props":175,"children":177},{"class":78,"line":176},6,[178],{"type":49,"tag":76,"props":179,"children":180},{},[181],{"type":55,"value":182},"chdb.query(\"SELECT * FROM deltaLake('s3:\u002F\u002Fbucket\u002Fdelta\u002Ftable', NOSIGN) LIMIT 10\")           # data lakes\n",{"type":49,"tag":76,"props":184,"children":186},{"class":78,"line":185},7,[187],{"type":49,"tag":76,"props":188,"children":189},{"emptyLinePlaceholder":143},[190],{"type":55,"value":146},{"type":49,"tag":76,"props":192,"children":194},{"class":78,"line":193},8,[195],{"type":49,"tag":76,"props":196,"children":197},{},[198],{"type":55,"value":199},"# Cross-source join\n",{"type":49,"tag":76,"props":201,"children":203},{"class":78,"line":202},9,[204],{"type":49,"tag":76,"props":205,"children":206},{},[207],{"type":55,"value":208},"chdb.query(\"\"\"\n",{"type":49,"tag":76,"props":210,"children":212},{"class":78,"line":211},10,[213],{"type":49,"tag":76,"props":214,"children":215},{},[216],{"type":55,"value":217},"    SELECT u.name, o.amount FROM mysql('db:3306', 'crm', 'users', 'root', 'pass') AS u\n",{"type":49,"tag":76,"props":219,"children":221},{"class":78,"line":220},11,[222],{"type":49,"tag":76,"props":223,"children":224},{},[225],{"type":55,"value":226},"    JOIN file('orders.parquet', Parquet) AS o ON u.id = o.user_id ORDER BY o.amount DESC\n",{"type":49,"tag":76,"props":228,"children":230},{"class":78,"line":229},12,[231],{"type":49,"tag":76,"props":232,"children":233},{},[234],{"type":55,"value":235},"\"\"\")\n",{"type":49,"tag":76,"props":237,"children":239},{"class":78,"line":238},13,[240],{"type":49,"tag":76,"props":241,"children":242},{"emptyLinePlaceholder":143},[243],{"type":55,"value":146},{"type":49,"tag":76,"props":245,"children":247},{"class":78,"line":246},14,[248],{"type":49,"tag":76,"props":249,"children":250},{},[251],{"type":55,"value":252},"data = {\"name\": [\"Alice\", \"Bob\"], \"score\": [95, 87]}\n",{"type":49,"tag":76,"props":254,"children":256},{"class":78,"line":255},15,[257],{"type":49,"tag":76,"props":258,"children":259},{},[260],{"type":55,"value":261},"chdb.query(\"SELECT * FROM Python(data) ORDER BY score DESC\")                                # Python data\n",{"type":49,"tag":76,"props":263,"children":265},{"class":78,"line":264},16,[266],{"type":49,"tag":76,"props":267,"children":268},{},[269],{"type":55,"value":270},"df = chdb.query(\"SELECT * FROM numbers(10)\", \"DataFrame\")                                   # output formats\n",{"type":49,"tag":76,"props":272,"children":274},{"class":78,"line":273},17,[275],{"type":49,"tag":76,"props":276,"children":277},{},[278],{"type":55,"value":279},"chdb.query(\"SELECT toDate({d:String}) + number FROM numbers({n:UInt64})\",\n",{"type":49,"tag":76,"props":281,"children":283},{"class":78,"line":282},18,[284],{"type":49,"tag":76,"props":285,"children":286},{},[287],{"type":55,"value":288},"    \"DataFrame\", params={\"d\": \"2025-01-01\", \"n\": 30})                                      # parametrized\n",{"type":49,"tag":58,"props":290,"children":291},{},[292,294,301,303,309,311],{"type":55,"value":293},"Table functions → ",{"type":49,"tag":295,"props":296,"children":298},"a",{"href":297},"references\u002Ftable-functions.md",[299],{"type":55,"value":300},"table-functions.md",{"type":55,"value":302}," | SQL functions → ",{"type":49,"tag":295,"props":304,"children":306},{"href":305},"references\u002Fsql-functions.md",[307],{"type":55,"value":308},"sql-functions.md",{"type":55,"value":310}," | Full API → ",{"type":49,"tag":295,"props":312,"children":314},{"href":313},"references\u002Fapi-reference.md",[315],{"type":55,"value":316},"api-reference.md",{"type":49,"tag":99,"props":318,"children":320},{"id":319},"session-stateful-analysis-pipelines",[321],{"type":55,"value":322},"Session — Stateful Analysis Pipelines",{"type":49,"tag":64,"props":324,"children":326},{"className":123,"code":325,"language":22,"meta":69,"style":69},"from chdb import session as chs\nsess = chs.Session(\".\u002Fanalytics_db\")   # persistent; Session() for in-memory\n\nsess.query(\"CREATE TABLE users ENGINE=MergeTree() ORDER BY id AS SELECT * FROM mysql('db:3306','crm','users','root','pass')\")\nsess.query(\"CREATE TABLE events ENGINE=MergeTree() ORDER BY (ts,user_id) AS SELECT * FROM s3('s3:\u002F\u002Flogs\u002Fevents\u002F*.parquet',NOSIGN)\")\nsess.query(\"\"\"\n    SELECT u.country, count() AS cnt, uniqExact(e.user_id) AS users\n    FROM events e JOIN users u ON e.user_id = u.id\n    WHERE e.ts >= today() - 7 GROUP BY u.country ORDER BY cnt DESC\n\"\"\", \"Pretty\").show()\nsess.close()\n",[327],{"type":49,"tag":72,"props":328,"children":329},{"__ignoreMap":69},[330,338,346,353,361,369,377,385,393,401,409],{"type":49,"tag":76,"props":331,"children":332},{"class":78,"line":79},[333],{"type":49,"tag":76,"props":334,"children":335},{},[336],{"type":55,"value":337},"from chdb import session as chs\n",{"type":49,"tag":76,"props":339,"children":340},{"class":78,"line":139},[341],{"type":49,"tag":76,"props":342,"children":343},{},[344],{"type":55,"value":345},"sess = chs.Session(\".\u002Fanalytics_db\")   # persistent; Session() for in-memory\n",{"type":49,"tag":76,"props":347,"children":348},{"class":78,"line":149},[349],{"type":49,"tag":76,"props":350,"children":351},{"emptyLinePlaceholder":143},[352],{"type":55,"value":146},{"type":49,"tag":76,"props":354,"children":355},{"class":78,"line":158},[356],{"type":49,"tag":76,"props":357,"children":358},{},[359],{"type":55,"value":360},"sess.query(\"CREATE TABLE users ENGINE=MergeTree() ORDER BY id AS SELECT * FROM mysql('db:3306','crm','users','root','pass')\")\n",{"type":49,"tag":76,"props":362,"children":363},{"class":78,"line":167},[364],{"type":49,"tag":76,"props":365,"children":366},{},[367],{"type":55,"value":368},"sess.query(\"CREATE TABLE events ENGINE=MergeTree() ORDER BY (ts,user_id) AS SELECT * FROM s3('s3:\u002F\u002Flogs\u002Fevents\u002F*.parquet',NOSIGN)\")\n",{"type":49,"tag":76,"props":370,"children":371},{"class":78,"line":176},[372],{"type":49,"tag":76,"props":373,"children":374},{},[375],{"type":55,"value":376},"sess.query(\"\"\"\n",{"type":49,"tag":76,"props":378,"children":379},{"class":78,"line":185},[380],{"type":49,"tag":76,"props":381,"children":382},{},[383],{"type":55,"value":384},"    SELECT u.country, count() AS cnt, uniqExact(e.user_id) AS users\n",{"type":49,"tag":76,"props":386,"children":387},{"class":78,"line":193},[388],{"type":49,"tag":76,"props":389,"children":390},{},[391],{"type":55,"value":392},"    FROM events e JOIN users u ON e.user_id = u.id\n",{"type":49,"tag":76,"props":394,"children":395},{"class":78,"line":202},[396],{"type":49,"tag":76,"props":397,"children":398},{},[399],{"type":55,"value":400},"    WHERE e.ts >= today() - 7 GROUP BY u.country ORDER BY cnt DESC\n",{"type":49,"tag":76,"props":402,"children":403},{"class":78,"line":211},[404],{"type":49,"tag":76,"props":405,"children":406},{},[407],{"type":55,"value":408},"\"\"\", \"Pretty\").show()\n",{"type":49,"tag":76,"props":410,"children":411},{"class":78,"line":220},[412],{"type":49,"tag":76,"props":413,"children":414},{},[415],{"type":55,"value":416},"sess.close()\n",{"type":49,"tag":99,"props":418,"children":420},{"id":419},"connection-api-db-api-20",[421],{"type":55,"value":422},"Connection API (DB-API 2.0)",{"type":49,"tag":64,"props":424,"children":426},{"className":123,"code":425,"language":22,"meta":69,"style":69},"from chdb import dbapi\nconn = dbapi.connect()\ncur = conn.cursor()\ncur.execute(\"SELECT * FROM file('data.parquet', Parquet) WHERE value > 100\")\nprint(cur.fetchall())\ncur.close()\nconn.close()\n",[427],{"type":49,"tag":72,"props":428,"children":429},{"__ignoreMap":69},[430,438,446,454,462,470,478],{"type":49,"tag":76,"props":431,"children":432},{"class":78,"line":79},[433],{"type":49,"tag":76,"props":434,"children":435},{},[436],{"type":55,"value":437},"from chdb import dbapi\n",{"type":49,"tag":76,"props":439,"children":440},{"class":78,"line":139},[441],{"type":49,"tag":76,"props":442,"children":443},{},[444],{"type":55,"value":445},"conn = dbapi.connect()\n",{"type":49,"tag":76,"props":447,"children":448},{"class":78,"line":149},[449],{"type":49,"tag":76,"props":450,"children":451},{},[452],{"type":55,"value":453},"cur = conn.cursor()\n",{"type":49,"tag":76,"props":455,"children":456},{"class":78,"line":158},[457],{"type":49,"tag":76,"props":458,"children":459},{},[460],{"type":55,"value":461},"cur.execute(\"SELECT * FROM file('data.parquet', Parquet) WHERE value > 100\")\n",{"type":49,"tag":76,"props":463,"children":464},{"class":78,"line":167},[465],{"type":49,"tag":76,"props":466,"children":467},{},[468],{"type":55,"value":469},"print(cur.fetchall())\n",{"type":49,"tag":76,"props":471,"children":472},{"class":78,"line":176},[473],{"type":49,"tag":76,"props":474,"children":475},{},[476],{"type":55,"value":477},"cur.close()\n",{"type":49,"tag":76,"props":479,"children":480},{"class":78,"line":185},[481],{"type":49,"tag":76,"props":482,"children":483},{},[484],{"type":55,"value":485},"conn.close()\n",{"type":49,"tag":99,"props":487,"children":489},{"id":488},"troubleshooting",[490],{"type":55,"value":491},"Troubleshooting",{"type":49,"tag":493,"props":494,"children":495},"table",{},[496,515],{"type":49,"tag":497,"props":498,"children":499},"thead",{},[500],{"type":49,"tag":501,"props":502,"children":503},"tr",{},[504,510],{"type":49,"tag":505,"props":506,"children":507},"th",{},[508],{"type":55,"value":509},"Problem",{"type":49,"tag":505,"props":511,"children":512},{},[513],{"type":55,"value":514},"Fix",{"type":49,"tag":516,"props":517,"children":518},"tbody",{},[519,541,558,591,604],{"type":49,"tag":501,"props":520,"children":521},{},[522,532],{"type":49,"tag":523,"props":524,"children":525},"td",{},[526],{"type":49,"tag":72,"props":527,"children":529},{"className":528},[],[530],{"type":55,"value":531},"ImportError: No module named 'chdb'",{"type":49,"tag":523,"props":533,"children":534},{},[535],{"type":49,"tag":72,"props":536,"children":538},{"className":537},[],[539],{"type":55,"value":540},"pip install chdb",{"type":49,"tag":501,"props":542,"children":543},{},[544,553],{"type":49,"tag":523,"props":545,"children":546},{},[547],{"type":49,"tag":72,"props":548,"children":550},{"className":549},[],[551],{"type":55,"value":552},"DB::Exception: FILE_NOT_FOUND",{"type":49,"tag":523,"props":554,"children":555},{},[556],{"type":55,"value":557},"Check file path; use absolute path or verify cwd",{"type":49,"tag":501,"props":559,"children":560},{},[561,570],{"type":49,"tag":523,"props":562,"children":563},{},[564],{"type":49,"tag":72,"props":565,"children":567},{"className":566},[],[568],{"type":55,"value":569},"DB::Exception: Unknown table function",{"type":49,"tag":523,"props":571,"children":572},{},[573,575,581,583,589],{"type":55,"value":574},"Check function name spelling (e.g., ",{"type":49,"tag":72,"props":576,"children":578},{"className":577},[],[579],{"type":55,"value":580},"deltaLake",{"type":55,"value":582}," not ",{"type":49,"tag":72,"props":584,"children":586},{"className":585},[],[587],{"type":55,"value":588},"deltalake",{"type":55,"value":590},")",{"type":49,"tag":501,"props":592,"children":593},{},[594,599],{"type":49,"tag":523,"props":595,"children":596},{},[597],{"type":55,"value":598},"Connection refused to remote DB",{"type":49,"tag":523,"props":600,"children":601},{},[602],{"type":55,"value":603},"Check host:port format; ensure remote DB allows connections",{"type":49,"tag":501,"props":605,"children":606},{},[607,612],{"type":49,"tag":523,"props":608,"children":609},{},[610],{"type":55,"value":611},"Environment check",{"type":49,"tag":523,"props":613,"children":614},{},[615,617,623],{"type":55,"value":616},"Run ",{"type":49,"tag":72,"props":618,"children":620},{"className":619},[],[621],{"type":55,"value":622},"python scripts\u002Fverify_install.py",{"type":55,"value":624}," (from skill directory)",{"type":49,"tag":99,"props":626,"children":628},{"id":627},"references",[629],{"type":55,"value":630},"References",{"type":49,"tag":632,"props":633,"children":634},"ul",{},[635,646,656,666,677],{"type":49,"tag":636,"props":637,"children":638},"li",{},[639,644],{"type":49,"tag":295,"props":640,"children":641},{"href":313},[642],{"type":55,"value":643},"API Reference",{"type":55,"value":645}," — query\u002FSession\u002Fconnect signatures",{"type":49,"tag":636,"props":647,"children":648},{},[649,654],{"type":49,"tag":295,"props":650,"children":651},{"href":297},[652],{"type":55,"value":653},"Table Functions",{"type":55,"value":655}," — All ClickHouse table functions",{"type":49,"tag":636,"props":657,"children":658},{},[659,664],{"type":49,"tag":295,"props":660,"children":661},{"href":305},[662],{"type":55,"value":663},"SQL Functions",{"type":55,"value":665}," — Commonly used SQL functions",{"type":49,"tag":636,"props":667,"children":668},{},[669,675],{"type":49,"tag":295,"props":670,"children":672},{"href":671},"examples\u002Fexamples.md",[673],{"type":55,"value":674},"Examples",{"type":55,"value":676}," — 9 runnable examples with expected output",{"type":49,"tag":636,"props":678,"children":679},{},[680],{"type":49,"tag":295,"props":681,"children":684},{"href":44,"rel":682},[683],"nofollow",[685],{"type":55,"value":686},"Official Docs",{"type":49,"tag":688,"props":689,"children":690},"blockquote",{},[691],{"type":49,"tag":58,"props":692,"children":693},{},[694,696,702,704,710],{"type":55,"value":695},"Note: This skill teaches how to ",{"type":49,"tag":697,"props":698,"children":699},"em",{},[700],{"type":55,"value":701},"use",{"type":55,"value":703}," chdb SQL.\nFor pandas-style operations, use the ",{"type":49,"tag":72,"props":705,"children":707},{"className":706},[],[708],{"type":55,"value":709},"chdb-datastore",{"type":55,"value":711}," skill.\nFor contributing to chdb source code, see CLAUDE.md in the project root.",{"type":49,"tag":713,"props":714,"children":715},"style",{},[716],{"type":55,"value":717},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":719,"total":229},[720,733,741,757,771,789,813,831,845,862,874,894],{"slug":709,"name":709,"fn":721,"description":722,"org":723,"tags":724,"stars":26,"repoUrl":27,"updatedAt":732},"accelerate pandas with chDB datastore","Use when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas. Provides chDB DataStore — same pandas API, ClickHouse engine underneath. Also handles reading from S3, MySQL, PostgreSQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake as DataFrames and joining across sources. TRIGGER when: user mentions DataFrame, parquet, csv, \"fast pandas\", \"speed up pandas\", or cross-source DataFrame joins; user imports `chdb.datastore` or `from datastore import DataStore`. SKIP this skill for raw SQL syntax (use chdb-sql instead), ClickHouse server administration, or non-Python DataStore API work.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[725,726,727,728,731],{"name":9,"slug":8,"type":13},{"name":18,"slug":19,"type":13},{"name":15,"slug":16,"type":13},{"name":729,"slug":730,"type":13},"Performance","performance",{"name":21,"slug":22,"type":13},"2026-04-15T04:56:32.0629",{"slug":4,"name":4,"fn":5,"description":6,"org":734,"tags":735,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[736,737,738,739,740],{"name":9,"slug":8,"type":13},{"name":18,"slug":19,"type":13},{"name":15,"slug":16,"type":13},{"name":21,"slug":22,"type":13},{"name":24,"slug":25,"type":13},{"slug":742,"name":742,"fn":743,"description":744,"org":745,"tags":746,"stars":26,"repoUrl":27,"updatedAt":756},"clickhouse-architecture-advisor","advise on ClickHouse architectures","MUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific system designs. Complements clickhouse-best-practices with decision frameworks and explicit provenance labels.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[747,750,751,752,755],{"name":748,"slug":749,"type":13},"Architecture","architecture",{"name":9,"slug":8,"type":13},{"name":15,"slug":16,"type":13},{"name":753,"slug":754,"type":13},"Database","database",{"name":729,"slug":730,"type":13},"2026-04-15T04:56:34.534001",{"slug":758,"name":758,"fn":759,"description":760,"org":761,"tags":762,"stars":26,"repoUrl":27,"updatedAt":770},"clickhouse-best-practices","review ClickHouse schemas and queries","MUST USE when reviewing ClickHouse schemas, queries, or configurations. Contains 31 rules that MUST be checked before providing recommendations. Always read relevant rule files and cite specific rules in responses.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[763,764,767,768,769],{"name":9,"slug":8,"type":13},{"name":765,"slug":766,"type":13},"Code Review","code-review",{"name":753,"slug":754,"type":13},{"name":729,"slug":730,"type":13},{"name":24,"slug":25,"type":13},"2026-04-06T18:07:18.953931",{"slug":772,"name":772,"fn":773,"description":774,"org":775,"tags":776,"stars":26,"repoUrl":27,"updatedAt":788},"clickhouse-js-node-rowbinary","encode and decode ClickHouse RowBinary streams","Generate TypeScript\u002FJavaScript code that reads\u002Fdecodes AND writes\u002Fencodes ClickHouse RowBinary streams for the ClickHouse HTTP server. Use this skill whenever a user wants to parse or produce `RowBinary`, `RowBinaryWithNames`, or `RowBinaryWithNamesAndTypes`. Node.js only, doesn't cover browsers.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[777,780,781,782,785],{"name":778,"slug":779,"type":13},"API Development","api-development",{"name":9,"slug":8,"type":13},{"name":753,"slug":754,"type":13},{"name":783,"slug":784,"type":13},"JavaScript","javascript",{"name":786,"slug":787,"type":13},"TypeScript","typescript","2026-07-01T08:16:19.314713",{"slug":790,"name":790,"fn":791,"description":792,"org":793,"tags":794,"stars":26,"repoUrl":27,"updatedAt":812},"clickhouse-managed-postgres-rca","diagnose performance issues on ClickHouse-managed Postgres","MUST USE when investigating performance issues on a ClickHouse-managed Postgres instance. Provides an evidence-based RCA workflow that scrapes the Prometheus endpoint for system signal, pulls per-digest evidence from the Slow Query Patterns API, and recommends (does not apply) a fix.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[795,796,799,802,805,806,809],{"name":9,"slug":8,"type":13},{"name":797,"slug":798,"type":13},"Debugging","debugging",{"name":800,"slug":801,"type":13},"Monitoring","monitoring",{"name":803,"slug":804,"type":13},"Observability","observability",{"name":729,"slug":730,"type":13},{"name":807,"slug":808,"type":13},"PostgreSQL","postgresql",{"name":810,"slug":811,"type":13},"Prometheus","prometheus","2026-06-08T08:19:31.589978",{"slug":814,"name":814,"fn":815,"description":816,"org":817,"tags":818,"stars":26,"repoUrl":27,"updatedAt":830},"infra-clickhouse","manage ClickHouse server instances","Sets up and manages ClickHouse using the clickhousectl CLI — installs and runs a local ClickHouse server for development, and creates managed ClickHouse Cloud services for production (authentication, service creation, schema migration, application connection). Use when the user wants to build an application with ClickHouse, set up a local ClickHouse dev environment, create tables and start querying, deploy ClickHouse to production or ClickHouse Cloud, or migrate from a local setup to the cloud.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[819,822,823,824,827],{"name":820,"slug":821,"type":13},"CLI","cli",{"name":9,"slug":8,"type":13},{"name":753,"slug":754,"type":13},{"name":825,"slug":826,"type":13},"Deployment","deployment",{"name":828,"slug":829,"type":13},"Infrastructure","infrastructure","2026-07-28T06:06:00.02089",{"slug":832,"name":832,"fn":833,"description":834,"org":835,"tags":836,"stars":26,"repoUrl":27,"updatedAt":844},"infra-postgres","manage PostgreSQL database instances","Sets up and manages Postgres using the clickhousectl CLI — runs a local Docker-backed Postgres for development, and creates and operates managed ClickHouse Cloud Postgres services (connections, TLS, runtime config, read replicas, failover, point-in-time restore). Use when the user wants a Postgres or PostgreSQL database for their application, a local Postgres dev environment, psql access, or a managed\u002Fproduction Postgres in ClickHouse Cloud, or mentions moving a local Postgres to production.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[837,838,839,842,843],{"name":753,"slug":754,"type":13},{"name":825,"slug":826,"type":13},{"name":840,"slug":841,"type":13},"Docker","docker",{"name":828,"slug":829,"type":13},{"name":807,"slug":808,"type":13},"2026-07-28T06:06:07.151976",{"slug":846,"name":846,"fn":847,"description":848,"org":849,"tags":850,"stars":859,"repoUrl":860,"updatedAt":861},"clickhouse-js-node-coding","build Node.js applications with ClickHouse","Write idiomatic application code with the ClickHouse Node.js client (`@clickhouse\u002Fclient`). Use this skill whenever a user is *building* against the Node.js client — configuring the client, pinging, inserting rows in JSON or raw formats, selecting and parsing results, binding query parameters, managing sessions and temporary tables, working with data types or customizing JSON parsing. Do NOT use for browser\u002FWeb client code.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[851,854,855,856],{"name":852,"slug":853,"type":13},"Backend","backend",{"name":9,"slug":8,"type":13},{"name":753,"slug":754,"type":13},{"name":857,"slug":858,"type":13},"Node.js","node-js",321,"https:\u002F\u002Fgithub.com\u002FClickHouse\u002Fclickhouse-js","2026-05-06T05:41:40.923776",{"slug":863,"name":863,"fn":864,"description":865,"org":866,"tags":867,"stars":859,"repoUrl":860,"updatedAt":873},"clickhouse-js-node-troubleshooting","troubleshoot ClickHouse Node.js client","Troubleshoot and resolve common issues with the ClickHouse Node.js client (@clickhouse\u002Fclient). Use this skill whenever a user reports errors, unexpected behavior, or configuration questions involving the Node.js client specifically — including socket hang-up errors, Keep-Alive problems, stream handling issues, data type mismatches, read-only user restrictions, proxy\u002FTLS setup problems, or long-running query timeouts. Trigger even when the user hasn't precisely named the issue; vague symptoms like \"my inserts keep failing\" or \"connection drops randomly\" in a Node.js context are strong signals to use this skill. Do NOT use for browser\u002FWeb client issues.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[868,869,870,872],{"name":9,"slug":8,"type":13},{"name":797,"slug":798,"type":13},{"name":857,"slug":871,"type":13},"nodejs",{"name":786,"slug":787,"type":13},"2026-04-14T04:56:39.447406",{"slug":875,"name":875,"fn":876,"description":877,"org":878,"tags":879,"stars":891,"repoUrl":892,"updatedAt":893},"clickstack-otel-collector","set up OpenTelemetry collector for ClickHouse","Use when a user wants to wire an OpenTelemetry collector into a Managed ClickStack service on ClickHouse Cloud, either by deploying a new local collector (Docker run or Docker Compose) or by configuring their own existing collector, then send rich synthetic telemetry and verify it is visible in ClickStack.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[880,881,884,887,888],{"name":9,"slug":8,"type":13},{"name":882,"slug":883,"type":13},"Logs","logs",{"name":885,"slug":886,"type":13},"Metrics","metrics",{"name":803,"slug":804,"type":13},{"name":889,"slug":890,"type":13},"OpenTelemetry","opentelemetry",196,"https:\u002F\u002Fgithub.com\u002FClickHouse\u002Fclickhouse-docs","2026-06-11T08:25:17.959323",{"slug":895,"name":895,"fn":896,"description":897,"org":898,"tags":899,"stars":158,"repoUrl":908,"updatedAt":909},"setup","set up ClickHouse MCP server connections","Guides users through setting up the ClickHouse MCP server connection bundled with this plugin. Use when the user first installs the plugin or has trouble connecting to ClickHouse.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[900,901,902,905],{"name":9,"slug":8,"type":13},{"name":753,"slug":754,"type":13},{"name":903,"slug":904,"type":13},"Local Development","local-development",{"name":906,"slug":907,"type":13},"MCP","mcp","https:\u002F\u002Fgithub.com\u002FClickHouse\u002Fclickhouse-claude-code-plugin","2026-04-19T04:59:29.849185",{"items":911,"total":193},[912,920,928,936,944,952,962],{"slug":709,"name":709,"fn":721,"description":722,"org":913,"tags":914,"stars":26,"repoUrl":27,"updatedAt":732},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[915,916,917,918,919],{"name":9,"slug":8,"type":13},{"name":18,"slug":19,"type":13},{"name":15,"slug":16,"type":13},{"name":729,"slug":730,"type":13},{"name":21,"slug":22,"type":13},{"slug":4,"name":4,"fn":5,"description":6,"org":921,"tags":922,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[923,924,925,926,927],{"name":9,"slug":8,"type":13},{"name":18,"slug":19,"type":13},{"name":15,"slug":16,"type":13},{"name":21,"slug":22,"type":13},{"name":24,"slug":25,"type":13},{"slug":742,"name":742,"fn":743,"description":744,"org":929,"tags":930,"stars":26,"repoUrl":27,"updatedAt":756},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[931,932,933,934,935],{"name":748,"slug":749,"type":13},{"name":9,"slug":8,"type":13},{"name":15,"slug":16,"type":13},{"name":753,"slug":754,"type":13},{"name":729,"slug":730,"type":13},{"slug":758,"name":758,"fn":759,"description":760,"org":937,"tags":938,"stars":26,"repoUrl":27,"updatedAt":770},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[939,940,941,942,943],{"name":9,"slug":8,"type":13},{"name":765,"slug":766,"type":13},{"name":753,"slug":754,"type":13},{"name":729,"slug":730,"type":13},{"name":24,"slug":25,"type":13},{"slug":772,"name":772,"fn":773,"description":774,"org":945,"tags":946,"stars":26,"repoUrl":27,"updatedAt":788},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[947,948,949,950,951],{"name":778,"slug":779,"type":13},{"name":9,"slug":8,"type":13},{"name":753,"slug":754,"type":13},{"name":783,"slug":784,"type":13},{"name":786,"slug":787,"type":13},{"slug":790,"name":790,"fn":791,"description":792,"org":953,"tags":954,"stars":26,"repoUrl":27,"updatedAt":812},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[955,956,957,958,959,960,961],{"name":9,"slug":8,"type":13},{"name":797,"slug":798,"type":13},{"name":800,"slug":801,"type":13},{"name":803,"slug":804,"type":13},{"name":729,"slug":730,"type":13},{"name":807,"slug":808,"type":13},{"name":810,"slug":811,"type":13},{"slug":814,"name":814,"fn":815,"description":816,"org":963,"tags":964,"stars":26,"repoUrl":27,"updatedAt":830},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[965,966,967,968,969],{"name":820,"slug":821,"type":13},{"name":9,"slug":8,"type":13},{"name":753,"slug":754,"type":13},{"name":825,"slug":826,"type":13},{"name":828,"slug":829,"type":13}]