Union can be an option if you want to unify the streams first and then apply a key by on the common stream.

Otherwise connect() is the way to go. See an example for joining here:

https://github.com/twalthr/flink-api-examples/blob/main/src/main/java/com/ververica/Example_06_DataStream_Join.java

Regards,
Timo


On 05.11.21 14:36, Dario Heinisch wrote:
Union creates a new stream containing all elements of the unioned streams: https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/datastream/operators/overview/#union

On 05.11.21 14:25, Marco Villalobos wrote:
Can two different streams flow to the same operator (an operator with the same name, uid, and implementation) and then share keyed state or will that require joining the streams first?




Reply via email to