Search code examples
javaapache-beamspring-cloud-dataflowdataflowapache-beam-io

Is it possible to write without breaking line for each pcollection in Java?


I've just started using Java SDK Apache beam. As it is required to write files without breaking lines on elements, I'm trying to find a way to do it.

Looking at below, I kind of find it similar but still I can't find the equivalent option. beam.io.WriteToText add new line after each value - can it be removed?

What I'm trying with is this.

org.apache.beam.sdk.io.TextIO.write()

Is it possible?

Thanks in advance.


Solution

  • An accumator which extends CombineFn<InputT, AccumT, OutputT> led it write concatenated string sets without breaking line.