I am using Apache Flink with programming language as Java to write a csv file to s3 using the FileSink Library.
Csv Data is successfully written to s3 file. But my requirement is to return the name of the file written in s3.
I have configured the Prefix and suffix as "test" and ".csv" respectively. But Flink adds its own UUID to the filename such as "test-2ea1c0a5-86c4-4af3-b61a-3c2ea4c1bce8-0.csv".
Code Snippet:
FileSink<RowData> sink = FileSink.forRowFormat(new Path(s3FilePath), new SerializationSchemaAdapter(serSchemaBuilder))
.withOutputFileConfig(new OutputFileConfig("test", ".csv"))
.build();
rowData.sinkTo(sink);
Can anyone please let me know how to obtain this filename from the sink response? OR Is this filename configurable ?