Commit Graph

6 Commits

Author SHA1 Message Date
mo aa9ee66966 fix: Run control on Data Flow now starts the live data generator
Previously Run/Pause/Stop only drove the pulse animation, so on the Data Flow
tab nothing was generated (the streamer is heartbeat-gated and only the Live
dashboard was sending heartbeats). Now:
- New POST /api/federated/live/heartbeat keep-alive endpoint.
- Run seeds an immediate burst into the sources and keeps the generator alive
  (5s heartbeat) while the tab is open; Pause/Stop halts generation.
2026-06-28 22:21:24 +00:00
mo 213350ec75 feat: Generate-data button + generation-script viewer + vector DB explorer
Data Flow tab:
- Prominent "Generate data" button (500 / 2K / 10K) that inserts a fresh
  burst of business rows into all source DBs on demand via a new
  POST /api/federated/generate (fresh connections, safe alongside the
  background streamer); result toast shows what was inserted, CDC streams it.
- "Scripts" button + a "View generation scripts" action on the Data Generator
  node open a modal listing every generator script with full source, served by
  GET /api/dataflow/scripts. Sources are the real files: the live streaming
  generator (sliced live out of trino_federated.py) and the Airflow per-source
  DAGs + Faker scripts (mounted read-only from infra/airflow into the API).

Knowledge Chat:
- New "Vector DB" explorer modal: shows the ChromaDB chunking config
  (RecursiveCharacterTextSplitter 800/120, all-MiniLM-L6-v2, 384-dim, HNSW),
  collections & documents, and the actual stored chunks with text, metadata and
  an embedding preview (bars + values) so you can see exactly how files are
  split and written as vectors.

Refactor: generator row-builders shared by the streamer and the on-demand burst.
2026-06-28 22:06:27 +00:00
mo 9059006cc2 feat: continuous live generator + vLLM/RAG lane in Data Flow
Live dashboard now feels truly real-time:
- Background generator streams randomly-sized bursts of real rows into
  PostgreSQL, MySQL, MongoDB & Cassandra every ~4s (CDC picks them up).
  Throughput rises and falls; counters move in lock-step (base snapshot +
  generated). Runs only while the Live tab is polling (heartbeat-gated) so
  source tables do not grow unbounded; on/off toggle exposed in the UI.
- New /api/federated/live/generator toggle; /live returns per-tick activity
  (last burst sizes, orders by region/status, event feed).
- LiveDashboard: live-activity panel, orders-per-tick sparkline, event
  stream feed, burst-by-region/status charts, generator status + control.

Data Flow graph now explains how data reaches the assistant:
- Added ChromaDB -> RAG (LangChain) -> vLLM Gateway -> Knowledge Chat lane,
  with Trino / OpenMetadata / curated-masked feeding LLM context. Live model
  & embed metrics pulled from the RAG /config. New node/edge kinds + legend.
2026-06-28 21:37:41 +00:00
mo 8c72d1dc63 feat: realtime Live dashboard in Data Explorer + fix panel layout
- New "Live" tab: auto-polls /api/federated/live every 2.5s with
  animated counters, ingestion throughput sparkline, per-source
  write-rate bars, a region scorecard matrix (heat-shaded) and live
  business breakdown charts (region/channel/status/customers/
  telemetry/supply)
- Backend /api/federated/live: instant source estimates (Postgres),
  monotonic max(event_id) for MySQL and Mongo estimated count for
  immediate movement, Cassandra from cached matrix; business aggs
  cached over the small Hadoop lake tables (short TTL)
- Fix embedded Trino panels being squeezed with internal scrollbars
  by making panels/grids shrink-0 so the page scrolls instead
2026-06-28 21:10:19 +00:00
mo 437574f0bb feat: federated query spans all 5 databases (not just 3)
The marquee panel only joined 3 region-keyed sources. Add a
"one SQL across every database" reach matrix that fans a single
Trino query out to PostgreSQL, MySQL, MongoDB, Cassandra and the
Hadoop/Iceberg lake in one UNION ALL (telemetry has no region, so
a per-source summary is used instead of a misleading join).

- New MATRIX_SQL + concurrent execution alongside the region
  scorecard so total latency stays ~ the slower query
- Federated tab shows the 5-source matrix (records + headline
  metric per engine) above the relabelled 3-source region scorecard
2026-06-28 18:51:55 +00:00
mo ea3e59cf9c feat: Trino federation + Hadoop external tables + LLM data catalog
Trino Federation tab (3 sub-views):
- Federated: catalog landscape + a single cross-source SQL that joins
  PostgreSQL + MySQL + MongoDB (region scorecard) — the federation proof,
  computed in the background and cached (large full scans take ~2 min).
- Hadoop Lake: all federated business data materialized as external Iceberg
  tables on HDFS (iceberg.hadoop.*_ext, ~120k rows each) with live, fast
  business analytics (revenue by region/channel, top customers, HR by
  department, supply by type, telemetry averages). Includes a one-click
  "rebuild external tables" job.
- Data Dictionary: every business table + column with masked / visible PII
  badges and categories.

Backend trino_federated.py: /catalogs, /marquee(+refresh), /lake,
/materialize(+status), /dictionary. Name-based PII detection flags raw PII
in derived/lake tables as visible vs physically-masked curated layer.

LLM context: platform_context now emits a full BUSINESS DATA CATALOG section
(tables, columns, types, source row counts, federated scorecard) with exact
per-column masked/visible status, so the assistant knows the data in detail
and what is masked vs not.
2026-06-28 18:01:25 +00:00