David Kiania
34f5fa1b9c
feat(dwh): bronze pipeline migrations, runbook, and execution manual
...
DWH pipeline (new):
- dwh/261001_dwh_control.sql — watermarks + per-run audit log schema
- dwh/261002_bronze_constraints_audit.sql — ON CONFLICT key assertion
- dwh/261003_dwh_roles.sql — dwh_owner / grafana_ro contract assertion
- dwh/261004_dwh_observability_views.sql — v_table_freshness,
v_recent_failures, v_watermark_lag (readable by grafana_ro)
- docs/DWH_PIPELINE.md — operations runbook (setup, troubleshooting,
manual re-run, back-fill, rotation)
- DWH_Execution_Manual.md — reusable playbook for future data
projects (extract → blob → load pattern, 7 design principles,
snapshot-vs-incremental matrix, verification gates)
- docs/superpowers/{specs,plans}/2026-04-24-n8n-dwh-bronze-pipeline-*
— design spec + 27-task implementation plan
Security:
- dwh/260423_dwh_ddl_v1.sql — redacted plaintext role passwords to
'CHANGE_ME_BEFORE_APPLY' placeholders; added SECURITY header
documenting generation + rotation flow
Docs:
- CLAUDE.md — §3 adds tracksolid_dwh@31.97.44.246:5888 target,
§4 adds dwh/ + docs/DWH_PIPELINE.md to codebase map, §5 adds
bronze + dwh_control schema roll-up, §10 adds deploy task +
password rotation follow-up
Also includes miscellaneous in-progress files accumulated on this
branch (workspace, analytics notes, vehicle CSVs, extract helpers,
renamed markdown archives).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 01:07:53 +03:00
David Kiania
274473c544
docs: update analytics report with live DB state (18 Apr 2026)
...
Static Analysis / static (push) Waiting to run
Tests / test (push) Waiting to run
Static Analysis / static (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
- §1: add current deployment state table — 63 devices, 0 driver names,
5 trips, pipeline stopped 6 Apr (401 token expiry); note tracksolid_2
vs tracksolid schema split
- §6: status column per question (Ready/Needs data/Blocked) reflecting
actual DB state; add cost-per-ticket, city drift, odometer rows
- §8: add Step 0 full deployment sequence (git pull → migrations 01-06
→ container rebuild → sync_driver_audit → import_drivers_csv);
Step 3 updated to reference import script; Step 5 collapsed to pointer
- Footer: db-state stamp and update date
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 08:39:58 +03:00
David Kiania
cebcf74ba2
feat: business analytics expansion + driver CSV import
...
- 01_BusinessAnalytics.md: add §0 usage tags, §2.4 cost-per-ticket,
§3.6–3.8 alarm/drift/odometer, §4.4–4.5 dispatch log + SLA metrics,
§9 fleet readiness scorecard, §10 service-interval forecaster,
Appendix B threshold calibration guide (773 → 1437 lines)
- 06_business_analytics_migration.sql: schema support for all new
analytics sections — assigned_city column, dispatch_log table,
ops schema, service_log, odometer_readings, tickets skeleton,
vw_service_forecast view
- import_drivers_csv.py: one-shot script to populate driver_name,
vehicle_number, vehicle_models, cost_centre, assigned_city, sim,
iccid, imsi from 20260414_FS__Logistics - final_fixed.csv (144 rows);
dry-run by default, --apply to commit, --only-null for safe additive mode
- 20260414_FS__Logistics - final_fixed.csv: source data committed for
reproducibility and container exec workflow
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 08:30:34 +03:00
David Kiania
40e452e156
Replace hardcoded container names with dynamic lookup
...
Coolify regenerates the container suffix on every redeploy, making
hardcoded names stale. All three docs now use:
TS_DB=$(docker ps --filter "name=timescale_db" --format "{{.Names}}" | head -1)
OPERATIONS_MANUAL.md: replaced bare connection string with full
tsdb() shell function, one-liner pattern, and multi-container
label-filter guidance.
tracksolid_DB_manual.md: updated header and connection example.
01_BusinessAnalytics.md: updated Step 5 migration commands.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 23:09:01 +03:00
David Kiania
09b3860706
Add fleet business analytics document
...
Covers fleet utilisation, driver behaviour (speeding, harsh driving,
tardiness, after-hours movement), real-time dispatch queries, km per
driver per day, full business question inventory, Grafana dashboard
blueprint, and the 5-step roadmap to unlock remaining capabilities.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 22:57:36 +03:00