@apache-arrow/es2015-esm

中文文档
21.2.0发布于 2026/07/21Apache-2.0TypeScriptES Module近 30 天下载 2886

Apache Arrow columnar in-memory format

原始使用文档
文档目录18 节
  1. Install apache-arrow from NPM
  2. Powering Columnar In-Memory Analytics
  3. Get Started
  4. Cookbook
  5. Get a table from an Arrow file on disk (in IPC format)
  6. Create a Table when the Arrow file is split across buffers
  7. Create a Table from JavaScript arrays
  8. Load data with fetch
  9. Vectors look like JS Arrays
  10. String vectors
  11. Getting involved
  12. Packaging
  13. Why we package like this
  14. Supported Browsers and Platforms
  15. People
  16. Powered By Apache Arrow JavaScript
  17. Open Source Projects
  18. License

Apache Arrow JavaScript

npm version

Apache Arrow is a universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics. It contains a set of technologies that enable data systems to efficiently store, process, and move data.

Install apache-arrow from NPM

npm install apache-arrow or yarn add apache-arrow

(read about how we package apache-arrow below)

Powering Columnar In-Memory Analytics

Apache Arrow is a columnar memory layout specification for encoding vectors and table-like containers of flat and nested data. The Arrow spec aligns columnar data in memory to minimize cache misses and take advantage of the latest SIMD (Single input multiple data) and GPU operations on modern processors.

Apache Arrow is the emerging standard for large in-memory columnar data (Spark, Pandas, Drill, Graphistry, ...). By standardizing on a common binary interchange format, big data systems can reduce the costs and friction associated with cross-system communication.

Get Started

Check out our API documentation to learn more about how to use Apache Arrow JavaScript. You can also learn by example by checking out some of the following resources:

Cookbook

Get a table from an Arrow file on disk (in IPC format)

import { readFileSync } from 'fs';
import { tableFromIPC } from 'apache-arrow';

const arrow = readFileSync('simple.arrow');
const table = tableFromIPC(arrow);

console.table(table.toArray());

/*
 foo,  bar,  baz
   1,    1,   aa
null, null, null
   3, null, null
   4,    4,  bbb
   5,    5, cccc
*/

Create a Table when the Arrow file is split across buffers

import { readFileSync } from 'fs';
import { tableFromIPC } from 'apache-arrow';

const table = tableFromIPC([
    'latlong/schema.arrow',
    'latlong/records.arrow'
].map((file) => readFileSync(file)));

console.table([...table]);

/*
        origin_lat,         origin_lon
35.393089294433594,  -97.6007308959961
35.393089294433594,  -97.6007308959961
35.393089294433594,  -97.6007308959961
29.533695220947266, -98.46977996826172
29.533695220947266, -98.46977996826172
*/

Create a Table from JavaScript arrays

import { tableFromArrays } from 'apache-arrow';

const LENGTH = 2000;

const rainAmounts = Float32Array.from(
    { length: LENGTH },
    () => Number((Math.random() * 20).toFixed(1)));

const rainDates = Array.from(
    { length: LENGTH },
    (_, i) => new Date(Date.now() - 1000 * 60 * 60 * 24 * i));

const rainfall = tableFromArrays({
    precipitation: rainAmounts,
    date: rainDates
});

console.table([...rainfall]);

Load data with fetch

import { tableFromIPC } from "apache-arrow";

const table = await tableFromIPC(fetch("/simple.arrow"));

console.table([...table]);

Vectors look like JS Arrays

You can create vector from JavaScript typed arrays with makeVector and from JavaScript arrays with vectorFromArray. makeVector is a lot faster and does not require a copy.

import { makeVector } from "apache-arrow";

const LENGTH = 2000;

const rainAmounts = Float32Array.from(
    { length: LENGTH },
    () => Number((Math.random() * 20).toFixed(1)));

const vector = makeVector(rainAmounts);

const typed = vector.toArray()

assert(typed instanceof Float32Array);

for (let i = -1, n = vector.length; ++i < n;) {
    assert(vector.get(i) === typed[i]);
}

String vectors

Strings can be encoded as UTF-8 or dictionary encoded UTF-8. Dictionary encoding encodes repeated values more efficiently. You can create a dictionary encoded string conveniently with vectorFromArray or efficiently with makeVector.

import { makeVector, vectorFromArray, Dictionary, Uint8, Utf8 } from "apache-arrow";

const utf8Vector = vectorFromArray(['foo', 'bar', 'baz'], new Utf8);

const dictionaryVector1 = vectorFromArray(
    ['foo', 'bar', 'baz', 'foo', 'bar']
);

const dictionaryVector2 = makeVector({
    data: [0, 1, 2, 0, 1],  // indexes into the dictionary
    dictionary: utf8Vector,
    type: new Dictionary(new Utf8, new Uint8)
});

Getting involved

See DEVELOP.md

Even if you do not plan to contribute to Apache Arrow itself or Arrow integrations in other projects, we'd be happy to have you involved:

We prefer to receive contributions in the form of GitHub pull requests. Please send pull requests against the github.com/apache/arrow-js repository.

If you are looking for some ideas on what to contribute, check out the GitHub issues for the Apache Arrow project. Comment on the issue and/or contact [email protected] with your questions and ideas.

If you’d like to report a bug but don’t have time to fix it, you can still post it on GitHub issues, or email the mailing list [email protected]

Packaging

apache-arrow is written in TypeScript, but the project is compiled to multiple JS versions and common module formats.

The base apache-arrow package includes all the compilation targets for convenience, but if you're conscientious about your node_modules footprint, we got you.

The targets are also published under the @apache-arrow namespace:

npm install apache-arrow # <-- combined es2015/CommonJS/ESModules/UMD + esnext/UMD
npm install @apache-arrow/ts # standalone TypeScript package
npm install @apache-arrow/es5-cjs # standalone es5/CommonJS package
npm install @apache-arrow/es5-esm # standalone es5/ESModules package
npm install @apache-arrow/es5-umd # standalone es5/UMD package
npm install @apache-arrow/es2015-cjs # standalone es2015/CommonJS package
npm install @apache-arrow/es2015-esm # standalone es2015/ESModules package
npm install @apache-arrow/es2015-umd # standalone es2015/UMD package
npm install @apache-arrow/esnext-cjs # standalone esNext/CommonJS package
npm install @apache-arrow/esnext-esm # standalone esNext/ESModules package
npm install @apache-arrow/esnext-umd # standalone esNext/UMD package

Why we package like this

The JS community is a diverse group with a varied list of target environments and tool chains. Publishing multiple packages accommodates projects of all stripes.

If you think we missed a compilation target and it's a blocker for adoption, please open an issue.

Supported Browsers and Platforms

The bundles we compile support moderns browser released in the last 5 years. This includes supported versions of Firefox, Chrome, Edge, and Safari. We do not actively support Internet Explorer. Apache Arrow also works on maintained versions of Node.

People

Full list of broader Apache Arrow committers.

  • Brian Hulette, committer
  • Paul Taylor, committer
  • Dominik Moritz, committer

Powered By Apache Arrow JavaScript

Full list of broader Apache Arrow projects & organizations.

Open Source Projects

  • Apache Arrow -- Parent project for Powering Columnar In-Memory Analytics, including affiliated open source projects
  • Perspective -- Perspective is an interactive analytics and data visualization component well-suited for large and/or streaming datasets. Perspective leverages Arrow C++ compiled to WebAssembly.
  • Falcon is a visualization tool for linked interactions across multiple aggregate visualizations of millions or billions of records.
  • Vega is an ecosystem of tools for interactive visualizations on the web. The Vega team implemented an Arrow loader.
  • Arquero is a library for query processing and transformation of array-backed data tables.
  • OmniSci is a GPU database. Its JavaScript connector returns Arrow dataframes.

License

Apache 2.0

版本与发布记录

@apache-arrow/es2015-esm 共发布 51 个版本,首次发布于 2017/08/15;过去 12 个月发布了 1 个版本。

版本发布日期距今
21.2.0latest2026/07/213 个月前
21.1.02025/10/071.1 年前
21.0.02025/07/041.3 年前
20.0.02025/05/141.5 年前
19.0.12025/02/191.7 年前
19.0.02025/01/161.8 年前

关于 @apache-arrow/es2015-esm 的常见问题

@apache-arrow/es2015-esm 是什么?

Apache Arrow columnar in-memory format

如何安装 @apache-arrow/es2015-esm?

在项目目录运行 npm install @apache-arrow/es2015-esm,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 arrow2csv,可以用 npx arrow2csv 直接运行。

@apache-arrow/es2015-esm 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@apache-arrow/es2015-esm 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@apache-arrow/es2015-esm 可以商用吗?

@apache-arrow/es2015-esm 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@apache-arrow/es2015-esm 的下载量有多少?

根据 npm 官方下载统计,@apache-arrow/es2015-esm 在 2026/10/06 – 2026/11/04 这 30 天内被下载 2,886 次,日均约 96 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@apache-arrow/es2015-esm 还在维护吗?

最新版本 21.2.0 发布于 2026/07/21(3 个月前);至今共发布 51 个版本,其中过去 12 个月发布了 1 个;首次发布于 2017/08/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。