2017-10-04 93 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