Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataStream
    • StreamExecutionEnvironment
    • DataStream
    • Functions
    • State
    • Timer
    • Window
    • Checkpoint
    • Side Outputs
    • Asynchronous I/O
    • Connectors
    • Formats
  • PyFlink DataFrame
  • PyFlink Common
  • API Reference
  • PyFlink DataStream
  • DataStream
  • pyflink.datastream.data_stream.DataStream.key_by

pyflink.datastream.data_stream.DataStream.key_by#

DataStream.key_by(key_selector: Callable | KeySelector, key_type: TypeInformation | None = None) → KeyedStream[source]#

Creates a new KeyedStream that uses the provided key for partitioning its operator states.

Parameters:
  • key_selector – The KeySelector to be used for extracting the key for partitioning.

  • key_type – The type information describing the key type.

Returns:

The DataStream with partitioned state(i.e. KeyedStream).

previous

pyflink.datastream.data_stream.DataStream.flat_map

next

pyflink.datastream.data_stream.DataStream.filter

On this page
  • DataStream.key_by()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.