pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.add_source#
- StreamExecutionEnvironment.add_source(source_func: SourceFunction, source_name: str = 'Custom Source', type_info: TypeInformation | None = None) DataStream[source]#
Adds a data source to the streaming topology.
- Parameters:
source_func – the user defined function.
source_name – name of the data source. Optional.
type_info – type of the returned stream. Optional.
- Returns:
the data stream constructed.