pyflink.datastream.data_stream.ConnectedStreams.key_by#
- ConnectedStreams.key_by(key_selector1: Callable | KeySelector, key_selector2: Callable | KeySelector, key_type: TypeInformation | None = None) ConnectedStreams[source]#
KeyBy operation for connected data stream. Assigns keys to the elements of input1 and input2 using keySelector1 and keySelector2 with explicit type information for the common key type.
- Parameters:
key_selector1 – The KeySelector used for grouping the first input.
key_selector2 – The KeySelector used for grouping the second input.
key_type – The type information of the common key type
- Returns:
The partitioned ConnectedStreams