arquero-worker

0.0.2 • Public • Published

arquero-worker

A proof-of-concept implementation of worker thread support for Arquero queries. Forks a worker thread using either a Web Worker or a node.js Worker thread and provides an API for authoring queries, submitting queries to the worker for processing, and fetching the query results.

Example

// create query worker, providing web worker script
const qw = aq.worker('./arquero-worker.min.js');

// load dataset into worker thread
// return value is a query builder with a table verb API
const beers = await qw.load('beers', 'data/beers.csv');

// build a query for beers with the word 'hop' in their name
// fetch the data, query is processed on worker thread
const hops = await beers
  .filter(d => op.match(d.name, /hop/i))
  .select('name', 'abv', 'ibu')
  .orderby('name')
  .fetch();

// print the fetched rows to the console
hops.print();

For more, see the example page and its source code.

Build Instructions

To build and develop arquero-query locally:

Package Sidebar

Install

npm i arquero-worker

Weekly Downloads

2

Version

0.0.2

License

BSD-3-Clause

Unpacked Size

8.58 MB

Total Files

28

Last publish

Collaborators

  • jheer