Query to find the topN dimension values of a datasource

Usage

druid.query.topN(url = druid.url(), dataSource, intervals, aggregations, filter = NULL, 
  granularity = "all", postAggregations = NULL, n, dimension, metric, context = NULL, 
      rawData = F, verbose = F, ...)

Arguments

url
URL to connect to druid, defaults to druid.url()
dataSource
name of the data source to query
intervals
the time period to retrieve data for as an interval or list of interval objects
aggregations
list of metric aggregations to compute for this datasource
filter
The filter specifying the subset of the data to extract.
granularity
time granularity for finding topN values, can be "all", "day", "hour", "minute".
postAggregations
Further operations to perform after the data has been filtered and aggregated.
n
The number of dimensions to return
dimension
name of the dimension over which to compute top N
metric
name of the metric (aggregation) used to rank values in top N
rawData
boolean indicating whether or not to return the JSON in a list before converting to a data frame
verbose
prints out the JSON query sent to druid

Value

Returns a dataframe with the largest values of the dimension, as well as the requested metrics

Description

For a particular datasource, find the top n dimension values for a given metric