Apache Arrow (JS)
Columnar in-memory format and JS library for building, transforming, and serializing Arrow tables and vectors.
Official Documentation ↗v17. Check the official docs for the latest API surface.Installation
npm install apache-arrowpnpm add apache-arrowMethods
No methods match this filter.
Overview
Apache Arrow (JS) is the JavaScript implementation of Apache Arrow, a columnar format for building, transforming, and serializing tables and vectors. This reference lists the most frequently used APIs with accurate signatures and runnable snippets.
Core APIs
tableFromArrays— Builds a columnar Table from a plain object of column arrays.tableToIPC— Serializes a Table into the Arrow IPC binary format for transport or storage.vectorFromArray— Creates a typed vector, the columnar unit inside an Arrow Table.
Example
const { tableFromArrays, tableToIPC } = require('apache-arrow');
const table = tableFromArrays({ id: [1, 2], name: ['a', 'b'] });
console.log(table.numRows);
Notes
Column types are fixed at construction, so mismatched data fails or is coerced. The IPC format is portable across Arrow implementations.
Verification
Build a table from two columns and confirm numRows matches the array length before serializing to IPC bytes.
API reference evidence
Fetched from official sources on 2026-11-08T09:38:08.940Z via WebFetch https://arrow.apache.org/js/main/functions/Arrow.dom.tableFromArrays.html; WebFetch https://arrow.apache.org/js/main/functions/Arrow.dom.tableToIPC.html; WebFetch https://arrow.apache.org/js/main/functions/Arrow.dom.vectorFromArray.html.
tableFromArrays→ signature from https://arrow.apache.org/js/main/functions/Arrow.dom.tableFromArrays.html; official text: “Function tableFromArrays tableFromArrays<I extends Record<string | number | symbol, readonly unknown[] | TypedArray | BigIntArray>>( input: I, ): Table<{ [P in string | number | symbol]: ArrayDataType<I[P]> }> Creates a “tableToIPC→ signature from https://arrow.apache.org/js/main/functions/Arrow.dom.tableToIPC.html; official text: “Function tableToIPC tableToIPC( table: Table, type?: “file” | “stream”, compressionType?:CompressionType | null, ): Uint8Array Serialize a Table to the IPC format. This function is a convenience “ vectorFromArray→ signature from https://arrow.apache.org/js/main/functions/Arrow.dom.vectorFromArray.html; official text: “vectorFromArray<T extends DataType<Type, any>>( values: readonly unknown[], type: T, ): VectorCreates a Vector from a JavaScript array via a Builder. Use makeVector if you only want to create a vector from a typed ar”
FAQ
- Why use Arrow instead of JSON for tables?
- Arrow stores columns contiguously and carries a type schema, so it is compact and lets consumers read fields without full parsing.
- What is the difference between file and stream IPC?
- File IPC includes a footer with schema and record batch locations, while stream IPC is a sequence of framed messages suited to sockets.
- How do I read an Arrow table in another language?
- All Arrow implementations share the IPC format and schema, so a Python or Rust reader can load the same bytes.
Report a problem with this API docOpens a pre-filled issue on GitHub.