源代码如下:
tenv .sqlQuery("select" + "hop_start(et, interval '1' hour,interval '3' hour) stt, " + "hop_end(et, interval '1' hour,interval '3' hour) edt, " + "itemId, " + "count(*) ct " + "from ub " + "where behavior='pv' " + "group by itemId, hop(et, interval '1' hour,interval '3' hour) ") .execute() .print();报错:
SQL parse failed. Non-query expression encountered in illegal context原因分析: 解决
将select后添加一个空格即可
总而言之,言而总之,用flink写sql是真tm的不方便.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)