clickhouse-database
Installation
SKILL.md
ClickHouse Database Skill
Use the clickhouse-client CLI to connect to and interact with ClickHouse databases. Use the -q flag to execute SQL statements and combine with --format options to produce clean output suitable for processing. Pipe the result to jq for reliable JSON formatting.
快速使用场景
场景 1: 查询数据(最常用)
clickhouse-client -h <host> -u <user> -d <db> -q "SELECT * FROM users LIMIT 10;" --format=JSONEachRow | jq -s '.'
场景 2: 查看表结构
clickhouse-client -h <host> -u <user> -d <db> -q "DESCRIBE TABLE users;" --format=TSV 2>/dev/null