docs: document prod_query.py in CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-03-10 17:16:34 +01:00
parent adf6f0c1ef
commit 44617ea783

View File

@@ -74,6 +74,24 @@ DUCKDB_PATH=local.duckdb SERVING_DUCKDB_PATH=analytics.duckdb \
```
## Production queries
Use `scripts/prod_query.py` to query the production DuckDB over SSH. **Always prefer this over raw SSH commands** — it handles escaping, enforces read-only, and blocks mutation keywords.
```bash
# Query analytics.duckdb (serving tables — default)
uv run python scripts/prod_query.py "SELECT COUNT(*) FROM serving.location_profiles"
# Query lakehouse.duckdb (foundation/staging tables)
uv run python scripts/prod_query.py --db lakehouse "SELECT * FROM foundation.dim_countries LIMIT 5"
# JSON output
uv run python scripts/prod_query.py --json "SELECT COUNT(*) FROM serving.location_profiles"
# Limit rows (default 500)
uv run python scripts/prod_query.py --max-rows 1000 "SELECT ..."
```
## Architecture documentation
| Topic | File |