pyflink.table.table_environment.StreamTableEnvironment.to_data_stream#
- StreamTableEnvironment.to_data_stream(table: pyflink.table.table.Table) pyflink.datastream.data_stream.DataStream [source]#
Converts the given Table into a DataStream.
Since the DataStream API does not support changelog processing natively, this method assumes append-only/insert-only semantics during the table-to-stream conversion. The records of class Row will always describe RowKind#INSERT changes. Updating tables are not supported by this method and will produce an exception.
Note that the type system of the table ecosystem is richer than the one of the DataStream API. The table runtime will make sure to properly serialize the output records to the first operator of the DataStream API. Afterwards, the Types semantics of the DataStream API need to be considered.
If the input table contains a single rowtime column, it will be propagated into a stream record’s timestamp. Watermarks will be propagated as well.
- Parameters
table – The Table to convert.
- Returns
The converted DataStream.