0.0.2 • Published 3 years ago

arquero-worker v0.0.2

Weekly downloads
7
License
BSD-3-Clause
Repository
github
Last release
3 years ago

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: