ahg microsoft streaminsight queries

Download AHG Microsoft StreamInsight Queries

Post on 12-Oct-2015

20 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

AHG Microsoft StreamInsight Queries

TRANSCRIPT

  • 5/21/2018 AHG Microsoft StreamInsight Queries

    1/54

  • 5/21/2018 AHG Microsoft StreamInsight Queries

    2/54

    A Hitchhikers Guide to Microsoft

    StreamInsight Queries

    Ramkumar (Ram) Krishnan, Jonathan Goldstein, Alex Raizman

    Summary:This paper is a developers introduction to the Microsoft StreamInsight Queries. The pap

    has two goals: (1) To help you think through stream processing in simple, layered levels of

    understanding, complementing the product documentation. (2) To reinforce this learning through

    examples of various use cases, so that you can design the query plan for a particular problem and

    compose the LINQ query. This ability for top-down composition of a LINQ query, combined with

    bottom-up understanding of the query model, will help you build rich and powerful streaming

    applications. The more advanced sections of this paper provide an overview of a query plan, the

    operators that constitute the query, and, where appropriate, the foundational query algebra itself. T

    paper is not a feature reference or a substitute for MSDN documentation.

    Category:Step-by-Step

    Applies to:StreamInsight

    Source:MSDN Library (link to source content, linkto code)

    E-book publication date:November 2012 (Document Version: Jun 12 2012)

    http://blogs.msdn.com/b/streaminsight/archive/2010/06/08/hitchhiker-s-guide-to-streaminsight-queries.aspxhttp://blogs.msdn.com/b/streaminsight/archive/2010/06/08/hitchhiker-s-guide-to-streaminsight-queries.aspxhttp://blogs.msdn.com/b/streaminsight/archive/2010/06/08/hitchhiker-s-guide-to-streaminsight-queries.aspxhttp://blogs.msdn.com/b/streaminsight/archive/2010/06/08/hitchhiker-s-guide-to-streaminsight-queries.aspxhttp://blogs.msdn.com/b/streaminsight/archive/2010/06/08/hitchhiker-s-guide-to-streaminsight-queries.aspxhttp://blogs.msdn.com/b/streaminsight/archive/2010/06/08/hitchhiker-s-guide-to-streaminsight-queries.aspx
  • 5/21/2018 AHG Microsoft StreamInsight Queries

    3/54

    Copyright 2012 by Microsoft Corporation

    All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the w

    permission of the publisher.

    Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/Trademarks/EN-US.aspxaretrademarks of the Microsoft group of companies. All other marks are property of their respective owners.

    The example companies, organizations, products, domain names, email addresses, logos, people, places, and events depicted herein a

    fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is

    intended or should be inferred.

    This book expresses the authors views and opinions. The information contained in this book is provided without any express, statut

    or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damage

    caused or alleged to be caused either directly or indirectly by this book.

    http://www.microsoft.com/about/legal/en/us/IntellectualProperty/Trademarks/EN-US.aspxhttp://www.microsoft.com/about/legal/en/us/IntellectualProperty/Trademarks/EN-US.aspx
  • 5/21/2018 AHG Microsoft StreamInsight Queries

    4/54

    Contents

    1.Introduction .................................................................................................................................................................................................................................................

    2.Tutorial ...........................................................................................................................................................................................................................................................

    2.1 Hello, Toll! Programming a StreamInsight application ...............................................................................................................................................

    2.2Query Development Process ..........................................................................................................................................................................................................

    2.3Understanding the Query Output ...............................................................................................................................................................................................

    3.More Windows Hop, Skip and Jump ..............................................................................................................................................................................................

    4.Partitioning Event Streams for Scale out computations ............................................................................................................................................................

    4.1Snapshot Window and AlterEventDuration to form Sliding Windows ..........................................................................................................................

    5.Multicast ........................................................................................................................................................................................................................................................

    6.Join ................................................................................................ ..................................................................................................................................................................

    6.1Alerting and Anomalies Left Anti Join (LAJ) ..........................................................................................................................................................................

    7.Lets Play Ball Heavy Hitters ...............................................................................................................................................................................................................

    8. Filter and Project ......................................................................................................................................................................................................................................

    9.Operators as Legos building up Outer Join..................................................................................................................................................................................

    10.Union................................................................................................................................................................ ............................................................................................

    11.Extending the Query with Smarts .....................................................................................................................................................................................................

    11.1User Defined Function ...................................................................................................................................................................................................................

    11.2User Defined Aggregates .............................................................................................................................................................................................................

    11.3User Defined Operator ..................................................................................................................................................................................................................

    12.Notes on Events and Event Modeling ............................................................................................................................................................................................

    12.1Event Shapes.......................................................................................................................................................................................................................................

    12.2 Event Kinds ...............................................................................................................................................................................................................................

    12.3Event CRUD......................................................................................................................................................................................................................................

    13.Step 5 Time and Commitment .......................................................................................................................................................................................................

    13.1Why does order matter? ...............................................................................................................................................................................................................

    13.2 Current Time Increment (CTI) Events..............................................................................................................................................................................

    13.3AdvanceTime Settings ...................................................................................................................................................................................................................

    14.Conclusion and F