You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by 沉醉寒風 <10...@qq.com> on 2021/02/02 06:05:12 UTC

flink sql

hi, 请问下 在1.12版本flink sql 可以 像datastream那样配置自定义的触发器吗?大家有做过吗,拜求一个例子

Re: flink sql

Posted by HunterXHunter <13...@qq.com>.
我做了。哈哈哈哈。
添加了一个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/