Skip to content

Agnostic data ingestion

“Be liberal in what you accept.” Every surface takes whatever data you already have and normalises it once to Polars internally — no reshaping, no manual schema.

from dash_tensor_grid import GridDataEngine
engine = GridDataEngine([
{"region": "EMEA", "revenue": 100},
{"region": "AMER", "revenue": 200},
])

The framework adapters take a plain array of row objects (Record<string, unknown>[]) — parse your JSON/CSV however you like and pass the array straight in; the engine port does the rest.

mountTensorGrid(el, { data: rows, rows: ['region'], measures: { revenue: 'sum' } });

The engine aggregates raw numerics (never stringify-then-sum), preserves precision, and serializes NaN / Inf / None deliberately as null so the frontend renders instead of crashing JSON.parse. Dates become epoch-ms / ISO-8601; exact money is scaled/Decimal-aware on the ingestion path.