Timo Walther created FLINK-19978:
------------------------------------
Summary: Add StreamStatementSet.attachToStream
Key: FLINK-19978
URL:
https://issues.apache.org/jira/browse/FLINK-19978 Project: Flink
Issue Type: Sub-task
Components: Table SQL / API
Reporter: Timo Walther
StatementSet solves use cases for pure SQL & Table API pipelines. However, currently there is no way of creating StatementSet for a DataStream API job.
We propose the following API:
{code}
StreamTableEnvironment.createStatementSet(): StreamStatementSet // return a stream-specific set
StreamStatementSet extends StatementSet {
/**
* Attaches the optimized statement set to the DataStream pipeline.
*/
attachToStream(): Unit
}
{code}
An example could look like:
{code}
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);
tEnv
.createStatementSet()
.addInsert(tEnv.from("FromTable"))
.attachToStream();
tEnv.from("OtherTable").toDataStream(...) // continue with further operations
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)