Does anyone know a way of reading parquet files with NodeJS?
I tried node-parquet -> very hard (but possible) to install - it works most of the time but not working for reading numbers (numerical data types).
Also tried parquetjs but that one can read only parquet files created by it's own library. Anything created with Spark or Python - can not read.
Thanks
Does anyone know a way of reading parquet files with NodeJS?
I found many libraries but most of them are dead/not maintained.
Also tried parquetjs but that one can read only parquet files created by it's own library. Anything created with Spark or Python - can not read.
I have not tried this library but parquet has a defined spec. We should be able to read a parquet file created from python or spark in JavaScript.
Other option:
Below code snippet using DuckDB to read parquet data directly from disk.
var duckdb = require('duckdb');
var db = new duckdb.Database(':memory:');
db.all("SELECT * FROM READ_PARQUET('D:\\sample\\userdata1.parquet') WHERE Country='Canada' LIMIT 3", function(err, res) {
if (err) {
throw err;
}
console.log(res)
});
DuckDB has a lot of features built around parquet.
Docs:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With