Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Observe that the granularity for the Druid query is MONTH.

 

Two One rather special cases are all and none granularitiescase is all granularity, which we introduce by example below. Consider the following query:

...

Code Block
{
  "queryType":"timeseries",
  "dataSource":"wikiticker",
  "descending":"false",
  "granularity":"ALL",
  "aggregations":[
    {"type":"longMax", "name":"$f1", "fieldName":"delta"},
    {"type":"longSum", "name":"$f2", "fieldName":"added"}
  ],
  "intervals":["-146136543-09-08T08:22:17.096-00:01:15/146140482-04-24T16:36:27.903+01:00"]
}

 

In turn, given the following query:

...

-- GRANULARITY: NONE
SELECT `__time`, max(delta), sum(added)
FROM druid_table_1
GROUP BY `__time`;

It translates into a timeseries query with granularity none, as it only groups events that happened exactly at the same time. The JSON query is as follows: 

Code Block
{
  "queryType":"timeseries",
  "dataSource":"wikiticker",
  "descending":"false",
  "granularity":"NONE",
  "aggregations":[
    {"type":"longMax", "name":"$f1", "fieldName":"delta"},
    {"type":"longSum", "name":"$f2", "fieldName":"added"}
  ],
  "intervals":["-146136543-09-08T08:22:17.096-00:01:15/146140482-04-24T16:36:27.903+01:00"]
}

...