About flink stream table API

2016-04-26 Thread Zhangrucong
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!




About flink stream table API

2016-04-27 Thread 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!




Re: About flink stream table API

2016-04-26 Thread Vasiliki Kalavri
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.

[1]: https://calcite.apache.org/docs/stream.html
[2]:
https://docs.google.com/document/d/1TLayJNOTBle_-m1rQfgA6Ouj1oYsfqRjPcp1h2TVqdI/edit?usp=sharing

On 26 April 2016 at 11:21, Zhangrucong  wrote:

> 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!
>
>
>
>
>


Re: About flink stream table API

2016-04-28 Thread Fabian Hueske
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 :

> 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!
>
>
>
>
>