flink sql

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

flink sql

沉醉寒風
hi, 请问下 在1.12版本flink sql 可以 像datastream那样配置自定义的触发器吗?大家有做过吗,拜求一个例子
Reply | Threaded
Open this post in threaded view
|

Re: flink sql

HunterXHunter
我做了。哈哈哈哈。
添加了一个sql语法类似

"select " +
                "msg," +
                "count(1) cnt" +
                " from test" +
                " where msg = 'hello' " +
                " group by TUMBLE(rowtime, INTERVAL '30' SECOND), msg " +
                " EMIT \n" +
                "  WITH DELAY '10' SECOND BEFORE WATERMARK,\n" +
                "  WITHOUT DELAY AFTER WATERMARK";

每10s触发一次窗口计算。
参考阿里云的Emit。



--
Sent from: http://apache-flink.147419.n8.nabble.com/