Skip to content

Allow customised s3manager.UploadInput #20

@linmaosong2018

Description

@linmaosong2018

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions