flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Pompermaier <pomperma...@okkam.it>
Subject Table API and registration of DataSet/DataStream
Date Fri, 08 Sep 2017 15:55:59 GMT
Hi to all,
I have a doubt about Table API.
Let's say my code is something like:


StreamTableEnvironment te = ...;
RowTypeInfo rtf = new RowTypeInfo(...);
DataStream<Row> myDs =
te.registerDataStream("test",myDs,columnNames);

Table table = te.sql("SELECT *, (NAME = 'John') as VALID FROM test WHERE
...";
myDs = te.toDataStream(table.where("VALID").select(columnNames), rtf);

If I do:

DataStream<Row> res = te.sql("SELECT * FROM test");

I'd like that res could take the data from the last version of myDs...is
this program correct..?
Or should I override the "test" table in the tableEnvironment? Is that
possible? I don't see any API to allow this..

Best,
Flavio

Mime
View raw message