Ejemplo n.º 1
0
        public void Execute()
        {
            var response = DruidClient.GroupBy <QueryResult>(q => q
                                                             .Dimensions(Wikiticker.Dimensions.CountryName)
                                                             .Aggregations(new LongSumAggregator("totalCount", Wikiticker.Metrics.Count))
                                                             .DataSource(Wikiticker.DataSource)
                                                             .Filter(new NotFilter(new SelectorFilter(Wikiticker.Dimensions.CountryName, string.Empty)))
                                                             .Interval(FromDate, ToDate)
                                                             .Granularity(Granularities.All)
                                                             );

            _results = response.Data.Select(x => x.Event).ToList();
        }
Ejemplo n.º 2
0
        public void Execute()
        {
            var response = DruidClient.GroupBy <QueryResult>(q => q
                                                             .Dimensions(Wikipedia.Dimensions.CountryName)
                                                             .Aggregations(new LongSumAggregator("totalCount", Wikipedia.Metrics.Count))
                                                             .DataSource(Wikipedia.DataSource)
                                                             .Interval(FromDate, ToDate)
                                                             .Granularity(Granularities.All)
                                                             .Limit(new DefaultLimitSpec(10, 10,
                                                                                         new OrderByColumnSpec(Wikipedia.Dimensions.CountryName, OrderByDirection.descending))
                                                                    )
                                                             );

            _results = response.Data.Select(x => x.Event).ToList();
        }