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 "casel.chen" <ca...@126.com> on 2022/01/11 01:47:20 UTC

cumulate窗口不支持偏移offset参数吗?

实时统计需求是每隔一小时计算周一到周日每周累计的交易量和总金额,拟使用flink sql cumulate window计算,假定作业启动时间是周四,如果不加offset偏移量参数的话,统计的是这周四到下周四的交易量和总金额,但我查了一下flink官方文档对cumulate window[1]介绍只有两个参数,一个是step,另一个是size,并没有看到offset,请问有没有办法实现?谢谢!
SELECTwindow_start,window_end,SUM(price)FROMTABLE(CUMULATE(TABLEBid,DESCRIPTOR(ts),INTERVAL'1'HOUR,INTERVAL'7'DAY))GROUPBYwindow_start,window_end;
[1] https://nightlies.apache.org/flink/flink-docs-release-1.13/zh/docs/dev/table/sql/queries/window-tvf/#cumulate