pyflink.datastream.data_stream.ConnectedStreams.key_by#
- ConnectedStreams.key_by(key_selector1: Union[Callable, pyflink.datastream.functions.KeySelector], key_selector2: Union[Callable, pyflink.datastream.functions.KeySelector], key_type: Optional[pyflink.common.typeinfo.TypeInformation] = None) pyflink.datastream.data_stream.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