forked from apache/druid
-
Notifications
You must be signed in to change notification settings - Fork 0
Post aggregations
cheddar edited this page Oct 30, 2012
·
5 revisions
PostAggregations are specifications of processing that should happen on aggregated values as they come out of Druid. The available grammar is:
"postAggregations": [<post_aggregator>, ...],
post_aggregator: <arithmetic_aggregation>, <field_accessor>, <constant>
arithmetic_aggregation: {
"type":"arithmetic",
"fn":<arithmetic_function>,
"field":[<post_aggregator>, <post_aggregator>, ...]
}
field_accessor: {"type":"fieldAccess", "fieldName":<field_name>}
constant: {"type":"constant", "value": <numerical_value>}
arithmetic_function: /, *, +, -
- arithmetic_aggregation – This applies the provided function to the fields from left to right.
- constant – This always returns the specified value
- field_accessor – This returns the value produced by an aggregator in the aggregations portion of the query