Working with Arrow
The @dpkit/arrow
package provides efficient support for loading and saving data in Apache Arrow format. It uses Polars DataFrames for high-performance columnar data processing.
Installation
Section titled “Installation”npm install @dpkit/arrow
Basic Usage
Section titled “Basic Usage”Loading Data
Section titled “Loading Data”import { loadArrowTable } from "@dpkit/arrow"
// Load from local fileconst table = await loadArrowTable({ path: "data.arrow" })
// Load multiple files (concatenated)const table = await loadArrowTable({ path: ["file1.arrow", "file2.arrow"]})
Saving Data
Section titled “Saving Data”import { saveArrowTable } from "@dpkit/arrow"
// Save as Arrow formatawait saveArrowTable(table, { path: "output.arrow" })