2017-10-04 13 views
0

이렇게 알림 이벤트를 일괄 처리하려고하는데 하나의 알림 이벤트가있는 알림 이벤트가 하나 있습니다. 누구든지 나를 도울 수 있습니까?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

이 솔루션은 이벤트 목록에 열을 포함하는 '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; 

나는 그것이 당신이 원하는 것이라고 생각합니다.

+0

대단히 감사합니다. 나는 그것을 시도하고 결과에 대해 논평 할 것이다. – Pablog1108

+0

완벽하게 작동합니다! 감사합니다 – Pablog1108

+0

한가지 더 ... 나는 EventOut : anonymous_ba90c239-f3ab-4a45-b0b4-77784e7d3a87_result와 같은 컨텍스트 출력 이벤트를 받고 있습니다. 나는 어떻게 그것들을 명명 할 수 있니? – Pablog1108