pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.add_source#
- StreamExecutionEnvironment.add_source(source_func: pyflink.datastream.functions.SourceFunction, source_name: str = 'Custom Source', type_info: Optional[pyflink.common.typeinfo.TypeInformation] = None) pyflink.datastream.data_stream.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.