tree: efea1755a419ee29d1e5f6dec3f1ade854ca2703 [path history] [tgz]
  1. bin/
  2. examples/
  3. spec/
  4. src/
  5. .gitignore
  6. .npmignore
  7. bower.json
  8. flatbuffers.sh
  9. package.json
  10. README.md
  11. tsconfig.json
  12. tslint.json
  13. webpack.config.js
js/README.md

Installation

From this directory, run:

$ npm install   # pull dependencies
$ npm run lint -- <filename>  # run tslint
$ npm run build # build typescript (run tsc and webpack)
$ npm run test  # run the unit tests (node.js only)

Usage

The library is designed to be used with node.js or in the browser, this repository contains examples of both.

Node

Import the arrow module:

var arrow = require("arrow");

See bin/arrow_schema.js and bin/arrow2csv.js for usage examples.

Browser

Include _bundles/arrow.js in a <script /> tag:

<script src="_bundles/arrow.js"/>

See examples/read_file.html for a usage example.

API

arrow.getReader(buffer)

Returns an ArrowReader object representing the Arrow file or stream contained in the buffer.

ArrowReader.loadNextBatch()

Loads the next record batch and returns it's length.

ArrowReader.getSchema()

Returns a JSON representation of the file's Arrow schema.

ArrowReader.getVectors()

Returns a list of Vector objects, one for each column. Vector objects have, at minimum, a get(i) method and a length attribute.

ArrowReader.getVector(name: String)

Return a Vector object for column name