-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to upload the parquet file to s3? #130
Comments
If it can help you, I managed to do it by using pure stream, but I don't know if
// say we already have sourceStream and `parquetStream`
s3Bucket.upload({
Bucket: 'bucketName',
Key: 'path/of/the/file',
Body: sourceStream.pipe(parquetStream)
}); // here I do a .promise() but this is for my usage Using stream can have the advantage of saving RAM. |
@sambonbonne, my friend! Can you put a more complete example, please! I don't understand anything about stream. Thank you very much! |
@eliasrosa I'm sorry, I don't know how to make a more complete example. I can add some variables or something but I'm not sure it will help: const parquetStream = new ParquetTransformer({ /* your parquet and transform parameters */ });
// saying you already have a Readable source stream as sourceStream
const conversionStream = sourceStream.pipe(parquetStream);
s3Bucket.upload({
Bucket: 'bucketName',
Key: 'path/of/the/file',
Body: conversionStream
}); I don't want to discourage you but I think you should not try to use streams without understanding those. Streams are important in NodeJS and have multiple advantages, maybe learning more about streams would be useful for you if you use NodeJS. (I hope you won't take this answer as an attack, I just don't know how I can help better) |
I have done this part, and the file gets saved locally. How to attach the file to a variable? If I can attach it to a variable, it will be easier to upload the file.
The text was updated successfully, but these errors were encountered: