Filtered aggregator with interval filtertype on time dimension

Hello, i’am trying then following query (i am working on a retention analysis).

{

“context”:{ “useCache”:“true”, “populateCache”:“true”},

“queryType”: “groupBy”,

“dataSource”: “visits_562498_theta”,

“granularity”:“all”,

“dimensions”: ,

“limitSpec”: { “type”: “default”, “limit”: 20, “columns”: [{“dimension”:“visits”, “direction”:“descending”}] },

“aggregations”: [

{ “type”: “longSum”, “name”: “visits”, “fieldName”: “visits” } ,

{ “type”: “hyperUnique”, “name”: “visitors”, “fieldName”: “visitors” },

{ “type”: “thetaSketch”, “name”: “visitorssketch”, “fieldName”: “visitorssketch” },

{

“type” : “filtered”,

“filter” : {

“type” : “interval”,

“dimension” : “__time”,

“intervals” : [“2016-11-08T00:00/2016-11-09T00:00”]

},

“aggregator” : {

“type”: “thetaSketch”, “name”: “visitorssketchp1”, “fieldName”: “visitorssketch”

}

}

],

“intervals”: [ “2016-11-08T00:00/2016-11-10T00:00” ]

}

I have the following error :

{

“error”: “Could not resolve type id ‘interval’ into a subtype of [simple type, class io.druid.query.filter.DimFilter]\n at [Source: HttpInputOverHTTP@1a6c3de; line: 14, column: 8] (through reference chain: java.util.ArrayList[2])”

}

Is seems not possible to apply an interval filter on the __time dimension to produce a new metric.

Thanks

Julien

hey which version are you running ?

make sure you have this patch in

https://github.com/druid-io/druid/pull/3315

the error you see it says that jackson doesn’t know about filter interval.

Ok, thank you Slim, we have the 0.9.1.1 version from July 2016.
I will get the latest version and try again.

Thank you

Julien

Ok, i installed the latest version (0.9.2-rc2), it’s working fine now.

Thanks Slim