ReadStream
class ReadStream
A ReadStream is one part of a parallelized read of a table, query, or upload. Each stream contains a subset of the rows, and can be read independently of the others, with the same to* methods as its parent.
Constructors
Method
Description
Table.toReadStreams([targetCount, options])
Examples
const table = redivis.table('demo.us_forest_service_fires:5k9t:v1_1.us_fire_perimeters:9r58');
// The server may return fewer streams than requested, depending on the size of the table
const streams = await table.toReadStreams(4, { variables: ['FIRENAME', 'FIREYEAR'] });
// Read the streams concurrently
const results = await Promise.all(streams.map((stream) => stream.toRowsArray()));
const rows = results.flat();Attributes
Methods
Method
Description
ReadStream.to*([maxResults, options])
Various methods to read the stream's data. Mirrors the corresponding Table.to* methods (e.g., stream.toArrowTable()).
Was this helpful?

