Help on RowTypeInfo?

2017-10-28 Thread PaulWu
Please help how to "translate" table to DataStream in the fellowing code. StreamTableEnvironment ste = StreamTableEnvironment.getTableEnvironment(EXE_ENV); ste.registerDataStreamInternal("abc", stream); Table ts = ste.sql("select * from abc"); ts = ts.as("count,word");

Re: Help on RowTypeInfo?

2017-10-28 Thread Timo Walther
Hi, the translate() method is an internal method. You can use "toRetractStream(table, Row.class)" or "toAppendStream(table, Row.class)" to convert you table into a stream. Make sure to use the correct StreamTableEnvironment for your API: org.apache.flink.table.api.java.StreamTableEnvironment

Re: Help on RowTypeInfo?

2017-10-29 Thread PaulWu
Where is this method(from which class/object) you mentioned? I can only find (new TableConversions(ts)).toRetractStream(TypeInformation.of(Row.class)) I use flink 1.3.2 java api, and weird the compilation error says this method is not available although I can see it in the api and my ide tip.

Re: Help on RowTypeInfo?

2017-10-29 Thread PaulWu
I felt it is so messy... for the api design: Look at this... StreamTableEnvironment can from three different packages, which I should choose? I tried each of them and I just have one problem or another. //import org.apache.flink.table.api.scala.StreamTableEnvironment; //import org.apache.flink.ta

Re: Help on RowTypeInfo?

2017-10-29 Thread PaulWu
Sorry for my rant...fairly new. Felt lost. The one (StreamTableEnvironment) from java needs to use the constructor: StreamTableEnvironment(StreamExecutionEnvironment execEnv, TableConfig config) . Now it works. Thanks. Still confused...why BatchTableEnvironment tEnv = TableEnvironment.getTableE

Re: Help on RowTypeInfo?

2017-11-01 Thread Fabian Hueske
Hi Paul, The *.scala.StreamTableEnvironment is for Scala programs, the *.java.StreamTableEnvironment for Java programs and the third is the common basis of the Scala and Java environment. TableEnvironment.getTableEnvironment automatically creates the appropriate TableEnvironment based on the provi