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