initial commit; reads 20 rows

master
Brian Sakal 2 years ago
commit b5d6662b66

@ -0,0 +1,4 @@
{
"deno.enable": true,
"deno.unstable": true
}

@ -0,0 +1,16 @@
import { open } from 'npm:lmdb';
import { CsvParseStream } from 'https://deno.land/std@0.184.0/csv/mod.ts';
const fileStream = (await Deno.open('/home/brian/Downloads/options-data/2013-01-02options.cvs', {read: true})).readable;
const csvParseStream = new CsvParseStream({skipFirstRow: true});
const rowStream = fileStream
.pipeThrough(new TextDecoderStream())
.pipeThrough(csvParseStream)
;
const rowReader = rowStream.getReader();
for(let i = 0; i<20; i++){
console.log(await rowReader.read());
}
Loading…
Cancel
Save