Any way to return only my post aggregation?

Hi all,

I am trying to integrate Druid with a BI solution that requires me to return query results in the form: datetime, metric_value. This works fine as long as I am querying a Druid provided metric, but as soon as I want to query an average or a rate I have to use a post aggregation on my query which returns both the post aggregated metric, and the metrics it is based on (see example below). Is there any way to tell Druid to return only the post aggregated metric?

Example:

{

“dimensions”: ,

“aggregations”: [

{

“filter”: {

“fields”: [

{

“type”: “selector”,

“dimension”: “event_status”,

“value”: “success”

},

{

“type”: “selector”,

“dimension”: “event_type”,

“value”: “walkin”

}

],

“type”: “and”

},

“aggregator”: {

“fieldName”: “count”,

“type”: “count”,

“name”: “count__successful_walkins”

},

“type”: “filtered”

},

{

“filter”: {

“type”: “selector”,

“dimension”: “event_type”,

“value”: “walkin”

},

“aggregator”: {

“fieldName”: “count”,

“type”: “count”,

“name”: “count__walkin_attempts”

},

“type”: “filtered”

}

],

“intervals”: “2016-10-26T00:00:00+00:00/2016-11-24T17:30:00+00:00”,

“limitSpec”: {

“limit”: 50,

“intervals”: “2016-10-26T00:00:00/2016-11-24T17:30:00”,

“type”: “default”,

“columns”: [

{

“direction”: “descending”,

“dimension”: “walkin_success_rate”

}

]

},

“granularity”: {

“timeZone”: “UTC”,

“type”: “period”,

“period”: “PT1H”

},

“postAggregations”: [

{

“fields”: [

{

“type”: “fieldAccess”,

“fieldName”: “count__successful_walkins”

},

{

“type”: “fieldAccess”,

“fieldName”: “count__walkin_attempts”

}

],

“type”: “arithmetic”,

“name”: “walkin_success_rate”,

“fn”: “/”

}

],

“queryType”: “groupBy”,

“dataSource”: “sor_business_events_all”

}

Thanks,

Hi Ben, currently there is not, but it would be nice to be able to tell Druid which fields to return in the result.