FinOps Hub — Hybrid SQL Engine
The staged pipeline behind FinOps Hub: route, plan, generate SQL (template or LLM), validate, execute, and summarize, with guardrails and a deterministic cache.
raw cost & usage, ingested as-is
conformed, deduped, typed
marts: agg_ / fact_ / dim_ · USD
The agent only ever queries the gold marts — that's what keeps answers consistent and costs standardized to USD.
What it does
It turns a plain-English cost question into governed SQL. Every stage is observable, and the engine runs free deterministic SQL wherever a metadata route exists, using the LLM only where one doesn't.
Flow
Route the question (analytics or chat), plan it into parallel intents, pick template SQL or fall back to LLM SQL per intent, validate with read-only guards and a row limit, execute with a result cache and one auto-correcting retry, then summarize. A full-response cache keyed on the question keeps answers identical.
Guardrails
No DML or DDL, no SELECT *, no multi-statements, no raw bronze or silver scans, and always a row limit. Every answer exposes the SQL and the steps it ran.