pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.from_source#
- StreamExecutionEnvironment.from_source(source: pyflink.datastream.connectors.base.Source, watermark_strategy: pyflink.common.watermark_strategy.WatermarkStrategy, source_name: str, type_info: Optional[pyflink.common.typeinfo.TypeInformation] = None) pyflink.datastream.data_stream.DataStream [source]#
Adds a data
Source
to the environment to get aDataStream
.The result will be either a bounded data stream (that can be processed in a batch way) or an unbounded data stream (that must be processed in a streaming way), based on the boundedness property of the source.
This method takes an explicit type information for the produced data stream, so that callers can define directly what type/serializer will be used for the produced stream. For sources that describe their produced type, the parameter type_info should not be specified to avoid specifying the produced type redundantly.
New in version 1.13.0.