Kimmo Sääskilahti
09/29/2023, 7:53 AMval events = ... # Define data stream
val stream1 = events.process(...)
val stream2 = events.process(...)
The docs for side outputs says that "_[side outputs are] useful when you want to split a stream of data where you would normally have to replicate the stream_". I don't understand if side outputs are necessary if I just want to process the same stream with two different operators. Thanks for any comments!Nicholas Erasmus
09/29/2023, 10:12 AMKimmo Sääskilahti
09/29/2023, 10:24 AMNicholas Erasmus
09/29/2023, 10:29 AMKimmo Sääskilahti
09/29/2023, 10:30 AMNicholas Erasmus
09/29/2023, 10:32 AMDavid Anderson
10/02/2023, 6:22 PMval events = ... # Define data stream
val stream1 = events.process(...)
val stream2 = events.process(...)
But if you want to split a stream, so that some events take one path and others take other paths, then you can either fork the stream as shown and then apply different filters to it:
val events = ... # Define data stream
val substream1 = events.filter1(...)
val substream2 = events.filter2(...)
Or you can use side outputs. One big advantage of side outputs is that the various output streams can have different types.Kimmo Sääskilahti
10/03/2023, 5:59 AM