Hi Tauseef, It sounds like you want to use side outputs <https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/dev/datastream/side_output/> (via a ProcessFunction, versus a FlatMap).
— Ken > On Dec 4, 2023, at 8:23 AM, Tauseef Janvekar <tauseefjanve...@gmail.com> > wrote: > > Dear Team, > > I was wondering if there is feature in flink that support conditional multi > colect. > > Conditons > 1. A stream is being processed and being converted to another stream/List > using flatMap. > 2. The place where collector.collect() is being called can we have multiple > other collectors also ? > 3. Can we add conditional collectors? Like if cond1 - then > collector1.collect(), elif cond2 then collector1.collect() and > collector2.collect(). > > I already know that I can do this serially by calling the same source stream > with a different flatMap and then convert and push using collector2 > > Thanks, > Tauseef -------------------------- Ken Krugler http://www.scaleunlimited.com Custom big data solutions Flink & Pinot