感谢您的回复,我试了一下,的确通过您说的这种方式,可以得到一个retract流的数据。换一个场景
我需要每小时计算当天的交易额(例如两点到了,我应该输出从0点到2点的总交易额)我想获得如下结果:
2020-03-28T01:00 100
2020-03-28T02:00 280
....
2020-03-28T23:00 18000
2020-03-28T00:00 19520
2020-03-29T01:00 120
2020-03-29T01:00 230
我应该获得是一个不断append的数据流,而不是retract数据流。
并且设置提前发射的事件,flink应该是选取的处理时间而不是事件时间?
在 2020-03-27 15:23:39,"Benchao Li" <[email protected]> 写道:
>Hi,
>
>对于第二个场景,可以尝试一下fast emit:
>table.exec.emit.early-fire.enabled = true
>table.exec.emit.early-fire.delay = 5min
>
>PS:
>1. 这个feature并没有在官方文档里面写出来,目前应该是一个实验性质的feature
>2. window加了emit之后,会由原来输出append结果变成输出retract结果
>
>Jingsong Li <[email protected]> 于2020年3月27日周五 下午2:51写道:
>
>> Hi,
>>
>> For #1:
>> 创建级联的两级window:
>> - 1分钟窗口
>> - 5分钟窗口,计算只是保存数据,发送明细数据结果
>>
>> Best,
>> Jingsong Lee
>>
>
>
>--
>
>Benchao Li
>School of Electronics Engineering and Computer Science, Peking University
>Tel:+86-15650713730
>Email: [email protected]; [email protected]