pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.from_collection#
- StreamExecutionEnvironment.from_collection(collection: List[Any], type_info: TypeInformation | None = None) DataStream[source]#
Creates a data stream from the given non-empty collection. The type of the data stream is that of the elements in the collection.
Note that this operation will result in a non-parallel data stream source, i.e. a data stream source with parallelism one.
- Parameters:
collection – The collection of elements to create the data stream from.
type_info – The TypeInformation for the produced data stream
- Returns:
the data stream representing the given collection.