DuckDB-Wasm is redefining client-side analytics — you can run real SQL over millions of rows in the browser. Its results, like Parquet and Arrow IPC, come back ascolumnar Apache Arrow tables, not the row objects a chart reads.fromArrow bridges that gap in one call, so an in-browser query feeds Semiotic directly.
Why this matters
The honest version first: Semiotic's data path is row-oriented today, sofromArrow v1 materializes rows — but leanly. It reads each requested column cell-by-cell into plain objects, skipping Arrow's own toArray()row-proxy machinery, and it supports column projection so you only pay for the fields you chart. The genuinely zero-copy columnar path — a typed-array accessor mode and bulk ring-buffer ingest — is deliberately not built here. It touches the streaming core, so it waits on a real high-throughput consumer and profiling evidence rather than being built on spec and marketed on a benchmark that doesn't exist yet.
An Arrow table in, a chart out
Below, a column-oriented Arrow-shaped table is read by fromArrow into row objects and charted. The orders column is int64 (Arrow returnsbigint); fromArrow coerces in-range values to numberso the scales work.
fromArrow(table) → rows
JSON
[ { "region": "North", "revenue": 128, "orders": 1240 }, { "region": "South", "revenue": 92, "orders": 980 }, { "region": "East", "revenue": 145, "orders": 1510 }, { "region": "West", "revenue": 71, "orders": 760 } ]
Wiring it up
TS
import { fromArrow } from "semiotic/data" // `table` is an Arrow Table or a DuckDB-Wasm result set — duck-typed, so // apache-arrow is never a Semiotic dependency. const rows = fromArrow(table) <BarChart data={rows} categoryAccessor="region" valueAccessor="revenue" /> // Project only the columns you chart — you don't pay to read the rest: const lean = fromArrow(table, { fields: ["region", "revenue"] })
Projecting { fields: ["region", "revenue"] } yields{ "region": "North", "revenue": 128 } per row — the orders column isn't read at all.
Where this goes
Paired with coordinated views, an in-browser DuckDB plus fromArrow drives cross-filtering over a live query: brush one chart, re-run the SQL, re-read the Arrow result. The streaming-kit work (windowing, backpressure) is the natural home for the high-throughput guarantees the columnar v2 will eventually need — and the discipline is to publish the measured number, whatever it says, before marketing it.
Related