Skip to content
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

Allow customised s3manager.UploadInput #20

Open
linmaosong2018 opened this issue Jul 10, 2020 · 0 comments
Open

Allow customised s3manager.UploadInput #20

linmaosong2018 opened this issue Jul 10, 2020 · 0 comments

Comments

@linmaosong2018
Copy link

At the moment, when the lib calls s3manager.Uploader.Upload, it constructs a default parameter input *UploadInput:

parquet-go-source/s3/s3.go

Lines 305 to 309 in 88e6b03

uploadParams := &s3manager.UploadInput{
Bucket: aws.String(s.BucketName),
Key: aws.String(s.Key),
Body: s.pipeReader,
}

This will suffice in most cases. However, this doesn't allow setting other upload options, e.g. SSEKMSKeyId

https://github.com/aws/aws-sdk-go/blob/80a52257588ca940087e586fcf38280fd1b3aab5/service/s3/s3manager/upload_input.go#L138

To allow more flexibility, how about using UploadInput here to replace both bucket and key?

// NewS3FileWriter creates an S3 FileWriter, to be used with NewParquetWriter
func NewS3FileWriter(
ctx context.Context,
bucket string,
key string,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant