2017-10-04 96 views
0

我正在尝试批处理这样的通知事件,并且我正在通过一个通知事件获取一个Notifications事件。谁能帮我?如何配料ESPER EPL事件

提前提醒。

相关声明

INSERT INTO Notification SELECT d.id as id,a.stationId as stationId,d.firebaseToken as firebaseToken, d.position as devicePos,a.location as stationPos,a.levelNumber as levelNumber,a.levelName as levelName FROM AirQualityAlert.win:time(3sec) as a, device.win:time(3sec) as d WHERE d.position.distance(a.location) < 300 

INSERT INTO Notifications SELECT * FROM Notification.std:groupwin(id).win:time_batch(20sec) for grouped_delivery(id) 
+1

听众收到一系列事件。也许你的代码没有看数组。 – user3613754

回答

1

该解决方案能够提供每“身份证”包含与事件列表中的列一行。

create context Batch20Sec start @now end after 20 sec; 
context Batch20Sec select id, window(*) as data 
from Notifications#keepall 
group by id 
output all when terminated; 

我认为这就是你想要的。

+0

非常感谢。我会试着去评论结果。 – Pablog1108

+0

完美的作品!谢谢 – Pablog1108

+0

还有一件事...即时获取事件输出事件的上下文输出事件:anonymous_ba90c239-f3ab-4a45-b0b4-77784e7d3a87_result。我怎样才能让他们命名? – Pablog1108