Skip to content

Commit

Permalink
Fixing the s3 suffix for parquet (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
i3149 authored Aug 8, 2024
1 parent 08cb8a2 commit 8c8be61
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pkg/sinks/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,17 @@ func (s *S3Sink) Init(ctx context.Context, format formats.Format, compression kt
s.dl = s3manager.NewDownloader(sess)
}

switch compression {
case kt.CompressionNone, kt.CompressionNull:
s.suffix = ""
case kt.CompressionGzip:
s.suffix = ".gz"
default:
s.suffix = "." + string(compression)
if format == formats.FORMAT_PARQUET {
s.suffix = ".parquet"
} else {
switch compression {
case kt.CompressionNone, kt.CompressionNull:
s.suffix = ""
case kt.CompressionGzip:
s.suffix = ".gz"
default:
s.suffix = "." + string(compression)
}
}

s.Infof("System connected to s3, bucket is %s, dumping on %v", s.Bucket, time.Duration(s.config.FlushIntervalSeconds)*time.Second)
Expand Down

0 comments on commit 8c8be61

Please sign in to comment.