ClickHouse Operations CLI — health checks, data quality profiling, and observability
Project description
chops
ClickHouse Operations CLI — health checks, data quality profiling, and observability from your terminal.
No more copy-pasting system table queries. One command to check cluster health, profile data quality, or find slow queries.
Quick Start
# Run directly with uvx (no install needed)
uvx chops health summary
# Or install with pip
pip install chops
Configuration
Set environment variables or pass flags:
export CLICKHOUSE_HOST=localhost
export CLICKHOUSE_PORT=8123
export CLICKHOUSE_USER=default
export CLICKHOUSE_PASSWORD=
Or use flags: chops --host myserver --user admin health summary
Commands
Health & Observability
| Command | Description |
|---|---|
chops health summary |
Cluster overview: version, uptime, databases, tables, parts, merges, queries |
chops health table-sizes |
Disk usage by table, sorted by size |
chops health slow-queries |
Top N slowest queries from query log |
chops health merges |
Currently running merge operations |
chops health running-queries |
Active queries with elapsed time and memory |
Data Quality
| Command | Description |
|---|---|
chops dq profile <table> |
Column-level profiling: null rates, cardinality, min/max |
chops dq check <table> |
Run quality checks with configurable thresholds (CI-friendly exit codes) |
chops dq freshness <table> |
Time since last row — OK/WARNING/CRITICAL with exit codes |
Examples
# Quick cluster health check
chops health summary
# Find which tables are eating disk
chops health table-sizes --limit 10
# Slowest queries in the last 6 hours
chops health slow-queries --hours 6
# Profile a table's data quality
chops dq profile mydb.events
# Run quality checks in CI (non-zero exit on failure)
chops dq check mydb.events --max-null-pct 5 --min-rows 1000
# Check if a streaming table is still receiving data
chops dq freshness mydb.events --warn 60 --critical 1440
# JSON output for automation
chops dq profile mydb.events --output json
CI/CD Integration
chops dq check and chops dq freshness return non-zero exit codes on failure, making them usable in CI pipelines:
- name: Data quality gate
run: |
chops dq check production.orders --max-null-pct 2 --min-rows 10000
chops dq freshness production.orders --warn 30 --critical 120
Development
git clone https://github.com/antonio-mello-ai/chops.git
cd chops
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check src/ tests/
# Type check
mypy src/
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chops-0.1.0.tar.gz.
File metadata
- Download URL: chops-0.1.0.tar.gz
- Upload date:
- Size: 51.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a792244b2683f7ca63f78b05cda3a75908672d284a64011b8f39285d03f400d
|
|
| MD5 |
8d9488f4baaa0daa5016d5e984258083
|
|
| BLAKE2b-256 |
7566a6678abfc3702599b6ea6af6784755e8326720552cda45949c41eec41e12
|
Provenance
The following attestation bundles were made for chops-0.1.0.tar.gz:
Publisher:
publish.yml on antonio-mello-ai/chops
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chops-0.1.0.tar.gz -
Subject digest:
1a792244b2683f7ca63f78b05cda3a75908672d284a64011b8f39285d03f400d - Sigstore transparency entry: 1070655424
- Sigstore integration time:
-
Permalink:
antonio-mello-ai/chops@0b04ebb1417a4ad4dc5d5442e410c69e698c7c3f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/antonio-mello-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0b04ebb1417a4ad4dc5d5442e410c69e698c7c3f -
Trigger Event:
release
-
Statement type:
File details
Details for the file chops-0.1.0-py3-none-any.whl.
File metadata
- Download URL: chops-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc5035d6755db6fc3368ed70271b06ed3d4d0cf227dbcb62d5ea275f4914fc37
|
|
| MD5 |
67539ee2c4593e1f19662c88fd63037c
|
|
| BLAKE2b-256 |
09fa65393eb3bf6d89665739ba6e997f48e25fdfb233d519d227bd4767792de9
|
Provenance
The following attestation bundles were made for chops-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on antonio-mello-ai/chops
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chops-0.1.0-py3-none-any.whl -
Subject digest:
cc5035d6755db6fc3368ed70271b06ed3d4d0cf227dbcb62d5ea275f4914fc37 - Sigstore transparency entry: 1070655425
- Sigstore integration time:
-
Permalink:
antonio-mello-ai/chops@0b04ebb1417a4ad4dc5d5442e410c69e698c7c3f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/antonio-mello-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0b04ebb1417a4ad4dc5d5442e410c69e698c7c3f -
Trigger Event:
release
-
Statement type: