StreamInsight complex query with filter on HoppingWindow
Posted
by
hh354
on Stack Overflow
See other posts from Stack Overflow
or by hh354
Published on 2012-10-10T12:44:11Z
Indexed on
2012/10/10
15:37 UTC
Read the original article
Hit count: 203
I'm trying out StreamInsight and I came across a problem with a query I need.
I'm trying to throw a warning if there are several changes in my measured values (of up to 20% change) in the last 30 minutes.
This is the query I came up with for now but it isn't working and it's not even correct I think.
Apparently I can't filter on a window...?
var deviationQuery = from s in wcfStream
group s by s.SensorId into grouped
from window in grouped.HoppingWindow(TimeSpan.FromMinutes(30),TimeSpan.FromMinutes(1))
where window.StdDev(e => e.Value) > measurableValue * 1.2
select new OutputEvent
{
Error = "Deviation"
};
Thanks in advance!
© Stack Overflow or respective owner