Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataStream
    • StreamExecutionEnvironment
    • DataStream
    • Functions
    • State
    • Timer
    • Window
    • Checkpoint
    • Side Outputs
    • Connectors
    • Formats
  • PyFlink Common

pyflink.datastream.functions.MapFunction#

class MapFunction[source]#

Base class for Map functions. Map functions take elements and transform them, element wise. A Map function always produces a single result element for each input element. Typical applications are parsing elements, converting data types, or projecting out fields. Operations that produce multiple result elements from a single input element can be implemented using the FlatMapFunction. The basic syntax for using a MapFunction is as follows:

::
>>> ds = ...
>>> new_ds = ds.map(MyMapFunction())

Methods

close()

map(value)

The mapping method.

open(runtime_context)

previous

pyflink.datastream.functions.RuntimeContext.get_aggregating_state

next

pyflink.datastream.functions.CoMapFunction

Show Source

Created using Sphinx 4.5.0.