esper - SQL statement convert to EPL -
i new in nesper, need convert sql statement epl
following sql scenario:
1. a main table field named "data", b table used stored distinct "data" value in
2. if there log come data value "test", write "test" b if there no "test" in b , keep current time @ b
3. @ same time trigger events
4. if there still records come same data value "test", nothing due there have "test" record in b
5. after 2 hours, clear "test" record in b, , loop step 2~5
i have read nesper document, still can figure out epl can achieve same thing above do, named window? table? or other keyword can give me advices or hints of epl me? many thanks.
you use "firstunique" window keep first unique item. can combine time window , keep first unique item given time. can use subquery check if item exists in named window.
Comments
Post a Comment