如何批处理 ESPER EPL 事件
How to Batching ESPER EPL events
我正在尝试像这样批处理通知事件,并且我得到了一个通知事件和一个通知事件。谁能帮帮我?
提前致谢。
相关声明
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)
此解决方案每 'id' 提供一行,其中包含一列事件列表。
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;
我想这就是你想要的。
我正在尝试像这样批处理通知事件,并且我得到了一个通知事件和一个通知事件。谁能帮帮我?
提前致谢。
相关声明
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)
此解决方案每 'id' 提供一行,其中包含一列事件列表。
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;
我想这就是你想要的。