摘要: 上篇博文介绍了StreamInsight基础查询操作中的分组排序部分。这篇文章将主要介绍如何StreamInsight查询中的决胜排序(Ranking and Tiebreaking)。 测试数据准备 为了方便测试查询,我们首先准备一个静态的测试数据源:var sourceData = new[]{ new { Name = "A", Count = 2, TieBreaker = 1 }, new { Name = "A", Count = 3, TieBreaker = 2 }, new { Name = "A", Count = 阅读全文
posted @ 2011-08-25 09:29 StreamInsight 阅读(1052) 评论(0) 推荐(0) 编辑
摘要: 上篇博文介绍了StreamInsight基础查询操作中的基础排序部分。这篇文章将主要介绍如何StreamInsight查询中的分组排序(TopK)。 测试数据准备 为了方便测试查询,我们首先准备一个静态的测试数据源:var weatherData = new[]{ new { Timestamp = new DateTime(2010, 1, 1, 0, 00, 00, DateTimeKind.Utc), Temperature = -9.0, StationCode = 71395, WindSpeed = 4}, new { Timestamp = new DateTime... 阅读全文
posted @ 2011-08-23 22:50 StreamInsight 阅读(1005) 评论(0) 推荐(2) 编辑
摘要: 上篇博文介绍了StreamInsight基础查询操作中的分组聚合部分。这篇文章将主要介绍如何StreamInsight查询中的基础排序(TopK)。 测试数据准备 为了方便测试查询,我们首先准备一个静态的测试数据源:var weatherData = new[]{ new { Timestamp = new DateTime(2010, 1, 1, 0, 00, 00, DateTimeKind.Utc), Temperature = -9.0, StationCode = 71395, WindSpeed = 4}, new { Timestamp = new DateTime... 阅读全文
posted @ 2011-08-23 10:08 StreamInsight 阅读(395) 评论(0) 推荐(1) 编辑
摘要: 上篇博文介绍了StreamInsight基础查询操作中的用户自定义聚合部分。这篇文章将主要介绍如何在StreamInsight查询中使用分组聚合。 测试数据准备 为了方便测试查询,我们首先准备一个静态的测试数据源:var weatherData = new[]{ new { Timestamp = new DateTime(2010, 1, 1, 0, 00, 00, DateTimeKind.Utc), Temperature = -9.0, StationCode = 71395, WindSpeed = 4}, new { Timestamp = new DateTime(... 阅读全文
posted @ 2011-08-22 23:11 StreamInsight 阅读(1115) 评论(0) 推荐(1) 编辑
摘要: 上篇博文介绍了StreamInsight基础查询操作中的聚合部分。这篇文章将主要介绍如何在StreamInsight查询中使用用户自定义聚合。 测试数据准备 为了方便测试查询,我们首先准备一个静态的测试数据源:var weatherData = new[]{ new { Timestamp = new DateTime(2010, 1, 1, 0, 00, 00, DateTimeKind.Utc), Temperature = -9.0, StationCode = 71395, WindSpeed = 4}, new { Timestamp = new DateTime(20... 阅读全文
posted @ 2011-08-22 17:37 StreamInsight 阅读(1148) 评论(1) 推荐(2) 编辑
摘要: 上篇博文介绍了StreamInsight基础查询操作中的过滤部分。这篇文章将主要介绍StreamInsight基础查询操作中的聚合部分。 测试数据准备 为了方便测试查询,我们首先准备一个静态的测试数据源:var weatherData = new[]{ new { Timestamp = new DateTime(2010, 1, 1, 0, 00, 00, DateTimeKind.Utc), Temperature = -9.0, StationCode = 71395, WindSpeed = 4}, new { Timestamp = new DateTime(2010,... 阅读全文
posted @ 2011-08-21 23:42 StreamInsight 阅读(1270) 评论(0) 推荐(1) 编辑
摘要: 上篇博文介绍了如何在LINQPad中输出StreamInsight查询结果。这篇文章将主要介绍StreamInsight基础查询操作中的过滤部分。 测试数据准备 为了方便测试查询,我们首先准备一个静态的测试数据源:var weatherData = new[]{ new { Timestamp = new DateTime(2010, 1, 1, 0, 00, 00), Temperature = -9.0, StationCode = 71395, WindSpeed = 4}, new { Timestamp = new DateTime(2010, 1, 1, 0, 30... 阅读全文
posted @ 2011-08-21 09:29 StreamInsight 阅读(1908) 评论(0) 推荐(1) 编辑
摘要: 上篇博文介绍了开始StreamInsight查询的一些准备工作。这篇文章将主要介绍如何在LINQPad中输出StreamInsight的查询结果。 生成数据源 首先生成一些随机数据以供后面的查询所用,如下:var random = new Random();var baseTime = DateTime.Now.ToLocalTime();var dataSource = from i in Enumerable.Range(0, 10) select new { Time = baseTime.AddSeconds(i), Value = random.NextDouble() };接下去将 阅读全文
posted @ 2011-08-20 19:00 StreamInsight 阅读(1912) 评论(1) 推荐(1) 编辑
摘要: 编写查询是使用StreamInsight进行开发工作中的一个最常见的工作,也是最关键的工作之一(另一个关键工作是编写适配器)。这个查询系列目的是让读者更深入的学习和使用怎样编写StreamInsight查询。 在正式开始讲解具体的查询之前,希望大家先按照先前的两篇博文进行一下准备工作: 《LINQPad中的StreamInsight驱动和样例更新啦》 其实就是安装LINQPad以及对应的StreamInsight驱动以及样例。 接下去的博文会围绕StreamInsight样例重点介绍StreamInsight中的基本查询以及复杂查询模式。 阅读全文
posted @ 2011-08-18 23:20 StreamInsight 阅读(1517) 评论(1) 推荐(1) 编辑
摘要: 原文链接:http://blogs.msdn.com/b/masimms/archive/2010/09/27/streaminsight-synchronizing-slow-moving-reference-streams-with-fast-moving-data-streams-time-import.aspx 使用StreamInsight的常见任务之一是使用引用流集成来自相对静态数据源(例如SQL Server表)的元数据或引用数据。集成引用流的难点在于它需要和生存期(liveliness)打交道,也就是说: 在这个图上,我们可以看到两个流(数据流和引用流)连接在一起创建出了一个连 阅读全文
posted @ 2011-08-14 17:24 StreamInsight 阅读(388) 评论(0) 推荐(1) 编辑