From 64b82dbd4adff844430f18505c1ff1734c0148e7 Mon Sep 17 00:00:00 2001 From: Deeman Date: Tue, 10 Mar 2026 22:19:19 +0100 Subject: [PATCH] =?UTF-8?q?docs:=20update=20CLAUDE.md=20=E2=80=94=20prod?= =?UTF-8?q?=5Fquery.py=20=E2=86=92=20prod.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .claude/CLAUDE.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 75f12b7..7601575 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -74,22 +74,28 @@ DUCKDB_PATH=local.duckdb SERVING_DUCKDB_PATH=analytics.duckdb \ ``` -## Production queries +## Production operations -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. +Use `scripts/prod.py` for all prod server operations over SSH. **Always prefer this over raw SSH commands** — it handles escaping, timeouts, and streaming. ```bash # Query analytics.duckdb (serving tables — default) -uv run python scripts/prod_query.py "SELECT COUNT(*) FROM serving.location_profiles" +uv run python scripts/prod.py query "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" +uv run python scripts/prod.py query --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" +uv run python scripts/prod.py query --json "SELECT COUNT(*) FROM serving.location_profiles" -# Limit rows (default 500) -uv run python scripts/prod_query.py --max-rows 1000 "SELECT ..." +# Pipeline operations +uv run python scripts/prod.py sqlmesh-plan --dry-run # preview only +uv run python scripts/prod.py sqlmesh-plan # plan + auto-apply +uv run python scripts/prod.py export # export serving tables +uv run python scripts/prod.py status # supervisor status +uv run python scripts/prod.py logs # last 100 log lines +uv run python scripts/prod.py logs -f # follow logs +uv run python scripts/prod.py deploy # blue/green deploy ``` ## Architecture documentation