THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Greg Low (The Bit Bucket: IDisposable)

Ramblings of Greg Low (SQL Server MVP, MCM and Microsoft RD) - SQL Down Under

SQL Server 2008 R2: StreamInsight changes at RTM: HoppingWindow, TumblingWindow, SnapshotWindow

We've been working on updating our demos and samples for the RTM changes of StreamInsight. I'll detail these as I come across them.

The first is that there is a change to the HoppingWindow. The first two parameters are the same in the constructor but the third parameter is now required. It is the HoppingWindowOutputPolicy. Currently, there is only a single option for this which is ClipToWindowEnd.

A similar change happened to the TumblingWindow. Curiously, it also takes a HoppingWindowOutputPolicy. I suppose that makes sense though as it is really just a special case of a HoppingWindow.

SnapshotWindow also now has a required parameter but in this case it's a SnapshotWindowOutputPolicy. The option for this policy is just called Clip.

Here are some examples of creating HoppingWindow, TumblingWindow and SnapshotWindow.

var queryOutput = from w in input.HoppingWindow




                  select new { VehiclesPerMinute = w.Count() };


var queryOutput = from w in input.TumblingWindow



                  select new { VehiclesPer10Seconds = w.Count() };


var queryOutput = from w in input.SnapshotWindow


                  select new { VehiclesPerWhat = w.Count() };


Published Friday, May 7, 2010 2:54 PM by Greg Low

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS



healthc2info said:


May 6, 2010 11:29 PM

Leave a Comment


This Blog



No tags have been created or used yet.


Privacy Statement