Re: Migrating createTemporaryView to new Table api.

2021-10-14 Thread Niels Basjes
Thanks. That works like a charm. Niels On Thu, Oct 14, 2021 at 5:17 AM Caizhi Weng wrote: > Hi! > > To implement the renaming of fields with the new API, try this: > > tableEnv.createTemporaryView( > "AgentStream", > inputStream, > Schema.newBuilder() >

Re: Migrating createTemporaryView to new Table api.

2021-10-13 Thread Caizhi Weng
Hi! To implement the renaming of fields with the new API, try this: tableEnv.createTemporaryView( "AgentStream", inputStream, Schema.newBuilder() .columnByExpression("useragent", "f0") .columnByExpression("expectedDeviceClass", "f1")

Migrating createTemporaryView to new Table api.

2021-10-13 Thread Niels Basjes
To test a Flink Table UDF I wrote a while ago I created this code to test it: (Full link: https://github.com/nielsbasjes/yauaa/blob/v6.0/udfs/flink-table/src/test/java/nl/basjes/parse/useragent/flink/table/TestTableFunction.java#L80 ) // The base execution environment StreamExecutionEnvironment