API Reference

Apache Arrow (JS)

Columnar in-memory format and JS library for building, transforming, and serializing Arrow tables and vectors.

Official Documentation ↗
CompatibilityThis documentation covers version v17. Check the official docs for the latest API surface.

Installation

npmnpm install apache-arrow
pnpmpnpm add apache-arrow

Methods

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.

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.