Hi Zain,

There are different options to achieve this. You can take a look at the
WordCount example [1] to get some inspiration.

[1]
https://github.com/apache/flink/blob/master/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/wordcount/WordCount.java

Best regards,
Alexander

On Fri, May 13, 2022 at 9:30 AM Zain Haider Nemati <zain.hai...@retailo.co>
wrote:

> Hi,
> I have a comma separated string of the format
> x,y,z \n
> a,b,c ...
>
> I want to split the string on the basis of '\n' and insert each string
> into the data stream separately using *flatmap*. Any example on how to do
> that? If I add the chunks into an Arralist or List and return that from the
> flatmap function would that work?
>


-- 

Alexander Preuß | Engineer - Data Intensive Systems

alexanderpre...@ververica.com

<https://www.ververica.com/>


Follow us @VervericaData

--

Join Flink Forward <https://flink-forward.org/> - The Apache Flink
Conference

Stream Processing | Event Driven | Real Time

--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--

Ververica GmbH

Registered at Amtsgericht Charlottenburg: HRB 158244 B

Managing Directors: Karl Anton Wehner, Holger Temme, Yip Park Tung Jason,
Jinwei (Kevin) Zhang

Reply via email to