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.FlatMapFunction#

class FlatMapFunction[source]#

Base class for flatMap functions. FlatMap functions take elements and transform them, into zero, one, or more elements. Typical applications can be splitting elements, or unnesting lists and arrays. Operations that produce multiple strictly one result element per input element can also use the MapFunction. The basic syntax for using a MapFUnction is as follows:

::
>>> ds = ...
>>> new_ds = ds.flat_map(MyFlatMapFunction())

Methods

close()

flat_map(value)

The core mthod of the FlatMapFunction.

open(runtime_context)

previous

pyflink.datastream.functions.CoMapFunction

next

pyflink.datastream.functions.CoFlatMapFunction

Show Source

Created using Sphinx 4.5.0.