I tried using parquetjs:
https://www.npmjs.com/package/parquetjs
Code from their example:
var parquet = require('parquetjs');
// declare a schema for the `fruits` table
var schema = new parquet.ParquetSchema({
name: { type: 'UTF8' },
quantity: { type: 'INT64' },
price: { type: 'DOUBLE' },
date: { type: 'TIMESTAMP_MILLIS' },
in_stock: { type: 'BOOLEAN' }
});
// create new ParquetWriter that writes to 'fruits.parquet'
var writer = await parquet.ParquetWriter.openFile(schema, 'fruits.parquet');
// append a few rows to the file
await writer.appendRow({name: 'apples', quantity: 10, price: 2.5, date: new Date(), in_stock: true});
await writer.appendRow({name: 'oranges', quantity: 10, price: 2.5, date: new Date(), in_stock: true});
Error:
SyntaxError: await is only valid in async function
What should be the problem (since they posted this as example)?