json lines reader, writer

This commit is contained in:
Jan Prochazka
2020-06-11 20:52:57 +02:00
parent 41ee6e9b91
commit b520501d1f
7 changed files with 105 additions and 29 deletions

View File

@@ -31,9 +31,15 @@ async function run() {
// header: false,
});
const jsonWriter = await dbgateApi.jsonLinesWriter({
fileName: 'test.jsonl',
header: false,
});
const consoleWriter = await dbgateApi.consoleObjectWriter();
await dbgateApi.copyStream(queryReader, csvWriter);
// await dbgateApi.copyStream(queryReader, csvWriter);
await dbgateApi.copyStream(queryReader, jsonWriter);
// await dbgateApi.copyStream(queryReader, consoleWriter);
}