-
Notifications
You must be signed in to change notification settings - Fork 155
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 modify the filename of the S3 object? #154
Comments
Searching through the files from the repo called 'kafka-connect-s3', I found this file:
I don't know if this can be customized to what I want to do but seems to be somehow near/related to my intentions. Hope it helps. |
Worth pointing out that the sink connector does not append into files, so you would be overriding those files if you were to change these lines + String name = "Data"
- String name = tp.topic()
- + fileDelim
- + tp.partition()
- + fileDelim
- + String.format(zeroPadOffsetFormat, startOffset)
+ extension; |
Hi, I've been using the S3 connector for a couple of weeks now, and I want to change the way the connector names each file. I am using the HourlyBasedPartition, so the path to each file is already enough for me to find each file, and I want the filenames to be something generic for all the files, like just 'Data.json.gzip' (with the respective path from the partitioner).
For example, I want to go from this:
<prefix>/<topic>/<HourlyBasedPartition>/<topic>+<kafkaPartition>+<startOffset>.<format>
To this:
<prefix>/<topic>/<HourlyBasedPartition>/Data.<format>
The objective of this is to only make one call to S3 to download the files later, instead of having to look for the filename first and then download it.
The text was updated successfully, but these errors were encountered: