forked from ZJONSSON/parquetjs
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Hello, I was wondering what is the recommended approach (or if it's even possible) to read data from parquet file in the render process of an Electron app?
Working in main process
import { readFileSync } from 'node:fs';
const parquet = require('@dsnp/parquetjs');
export async function readParquet(filePath: string) {
const buffer = readFileSync(filePath);
const reader = await parquet.ParquetReader.openBuffer(buffer);
const meta = reader.getMetadata();
console.log(meta);
}Not working in render process
import parquetjs from '@dsnp/parquetjs/dist/browser/parquetjs.esm'
const buffer = window.electronAPI.fs.readFileSync(f);
console.log('Expecting PAR1:', new TextDecoder().decode(buffer.slice(0, 4)));
const reader = await parquetjs.ParquetReader.openBuffer(buffer);
const meta = reader.getMetadata();
console.log(meta);Logs:
Expecting PAR1: PAR1
not valid parquet file
Metadata
Metadata
Assignees
Labels
No labels