Ich habe folgende siddhi query
verwendet, um die Anzahl der Ereignisse pro Minute zu erhalten; ts als timestamp (string) und ftp_requests als count (int).WSO2CEP: Abrufen des vorherigen Ereigniswerts aus dem Stream in Siddhi-Abfrage
from FTPInStream[command == 'USER']
select time:timestampInMilliseconds(time:dateAdd(str:replaceAll(ts,'T',' '), 5, 'hour',"yyyy-MM-dd HH:mm:ss"),'yyyy-MM-dd HH:mm') as milliseconds , uid, id_orig_h, id_orig_p, id_resp_h, id_resp_p
insert into intermediateStream;
from intermediateStream#window.externalTimeBatch(milliseconds ,1 min, milliseconds, 1 min)
select time:dateFormat(milliseconds, 'yyyy-MM-dd HH:mm') as ts , cast(count(milliseconds), 'int') as ftp_requests
group by milliseconds
insert into FTPOutStream;
Wenn ich will vorherigen Wert von ftp_requests in jedem neuen Wert hinzufügen, um die kumulative Anzahl der Anfragen mit jeder neuen Anfragen zu bekommen, welche Änderung erforderlich wäre? Gibt es irgendeine Funktion in Siddhi, um den vorherigen Ereigniswert vom bereits veröffentlichten Stream zu erhalten?