Open yaplas opened 3 years ago
You've probably sorted this now but if it helps another... Inline with your closing comment, here's how I got around this same issue:
import s3UploadStream = require('s3-upload-stream');
const s3Stream = s3UploadStream(S3);
...
const upload: S3WriteParquetStream = s3Stream.upload({ Bucket, Key });
upload.close = () => upload.end();
const writer = await parquet.ParquetWriter.openStream(schema, upload);
Hi @yaplas! I am running into this exact same issue using the TypeScript parquets library. Did you ever find a fix? I got it working using the parquetjs-lite library, but would prefer the TS one if possible.
@nickjames640 old comment, but for future reference you can do:
// @ts-ignore
parquetWritable.close = () => parquetWritable.end();
I'm using a parquet stream to track api usage, and every seems working ok except for when I try to close the stream i get an error: `os.close is not a function'. I suppose it is happening here: https://github.com/ironSource/parquetjs/blob/455ff9ffce89ac055fd667cf8d0555aec93f7c9f/lib/util.js#L122
I create the stream this way:
where fileStream is a
s3-upload-stream
streamthen I append rows using
appendRow
, but when I try to close it I get the error.s3-upload-stream
stream does not have aclose
method, it has anend
method, could be this the issue ? bc I supposeos
is output stream. So I wondering if I need to wrap thes3-upload-stream
into an object with aclose
method that internally call theend
method ?