Re: Convert DataStream to Table with the same columns in Row

2021-05-16 Thread John Smith
Thanks for your help Timo and Fabian, Got it working with Timo’s suggestion. On Fri, May 14, 2021 at 6:14 AM Fabian Paul wrote: > Hi John, > > Can you maybe share more code about how you build the DataStrean? > It would also be good to know against which Flink version you are testing. > I just >

Re: Convert DataStream to Table with the same columns in Row

2021-05-14 Thread Fabian Paul
Hi John, Can you maybe share more code about how you build the DataStrean? It would also be good to know against which Flink version you are testing. I just tried the following code against the current master and: StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env); DataStream r

Re: Convert DataStream to Table with the same columns in Row

2021-05-14 Thread Timo Walther
Hi John, please check the type that is coming in from the DataStream API via dataStream.getType(). It should be an instance of RowTypeInfo otherwise the Table API cannot extract the columns correctly. Usually, you can overwrite the type of the last DataStream operation using the `.returns(Ty

Convert DataStream to Table with the same columns in Row

2021-05-14 Thread John Smith
Hi, Sorry if this is a duplicate question but I couldn't find any answer to my question. I am trying to convert a DataStream into a Table where the columns in the Row objects in the DataStream will become columns of the Table. Here is how I tried to do it: //Creating a DataStream of Row type. Let