Reputation: 157
I need store a white list by 2 mins, but i need execute a query (using my white list) when a new stream arrive. I am using two stream with the next code:
I need to charge my WHITELIST updated every two minutes.
define trigger periodicalTriggerStream at every 2 min;
from DSB_TEMPORAL#window.time(2 min)
select wlist:whitelist() as whitel , DSB_licensekey, flg_urldsb
insert into temporal;
I need that this query execute when arrive a new event. (I use my whitelist)
from temporal
select findwlist:findwhitelist(DSB_licensekey, flg_urldsb, whitel) as flg_url11
insert into temporal_WL11;
Is it posible?
Upvotes: 0
Views: 79
Reputation: 912
Will this work?
define trigger periodicalTriggerStream at every 2 min;
from periodicalTriggerStream
select wlist:whitelist() as whitel
insert into whitelStream;
from whitelStream#window.length(1) join newEventStream
select findwlist:findwhitelist(DSB_licensekey, flg_urldsb, whitel) as flg_url11
insert into temporal_WL11;
The basic idea is you calculate wlist:whitelist() every 2 min, store the results in #window.length(1) and then join the new events with the event window.
Upvotes: 1