Question

I am developing a StreamInsight application which is supposed to compute a function of every N inputs i.e. if N=10 then I want to compute:

x_1, x_2, ..., x_10  ---> output_1
x_11, x_12, ..., x_20 ---> output_2

etc.

So what I want is a Hopping Window, except parameterized on Count rather than Time stamp.

I can't use a Count Window because those produce output every time the count changes.

I am looking for suggestions on how to get around the lack of a "Hopping Count Window".

Was it helpful?

Solution

Take a look at using a User-defined Stream Operator. Events will come into your operator one by one which will make it easy to maintain a collection of the last N events/inputs. Once you've received your Nth event, do the computation, clear your events/inputs collection, and return the result.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top