|
Hello: I want to learn the flink stream API. The stream sql is the same with calcite? In the flowing link, the examples of table api are dataset, where I can see the detail introduction of streaming table API. https://ci.apache.org/projects/flink/flink-docs-master/apis/batch/libs/table.html Thanks in advance! |
|
Hello, the stream table API is currently under heavy development. So far, we support selection, filtering, and union operations. For these operations we use the stream SQL syntax of Apache Calcite [1]. This is as simple as adding the "STREAM" keyword. Registering a datastream table and running a stream SQL query works the same way as for Datasets. Here's a filtering example in Scala: -------------- val env = StreamExecutionEnvironment.getExecutionEnvironment val tEnv = TableEnvironment.getTableEnvironment(env) val dataStream = env.addSource(...) val t = dataStream.toTable(tEnv).as('a, 'b, 'c) tEnv.registerTable("MyTable", t) val sqlQuery = "SELECT STREAM * FROM MyTable WHERE a = 3" val result = tEnv.sql(sqlQuery).toDataStream[Row] --------------- You can find more details on our plans to support windows and aggregations in the design document [2]. Feedback and ideas are very welcome! Cheers, -Vasia. On 26 April 2016 at 11:21, Zhangrucong <[hidden email]> wrote:
|
|
In reply to this post by Zhangrucong
Hello everybody: I want to learn the flink stream API. The stream sql is the same with calcite? In the flowing link, the examples of table api are dataset, where I can see the detail introduction of streaming table API. https://ci.apache.org/projects/flink/flink-docs-master/apis/batch/libs/table.html somebody who can help me. Thanks in advance! |
|
Hi, Table API and SQL for streaming are work in progress. A first version which supports projection, filter, and union is merged to the master branch.Under the hood, Flink uses Calcite to optimize and translate Table API and SQL queries. Best, Fabian 2016-04-27 14:27 GMT+02:00 Zhangrucong <[hidden email]>:
|
| Free forum by Nabble | Edit this page |
