Moment Sketches for Approximate Quantiles module
To use this Apache Druid extension, make sure you include the extension in your config file:
The aggregator operates over raw data while the momentSketchMerge
aggregator should be used when aggregating precomputed sketches.
{
"type" : <aggregator_type>,
"name" : <output_name>,
"fieldName" : <input_name>,
"k" : <int>,
"compress" : <boolean>
}
Users can also query for the min/max of a distribution:
{
"type" : "momentSketchMin" | "momentSketchMax",
}
and make queries using the following aggregator + post-aggregator:
{
"aggregations": [{
"type": "momentSketchMerge",
"name": "sketch",
"fieldName": "sketch",
"k": 10,
"compress": true
}],
"postAggregations": [
{
"type": "momentSketchSolveQuantiles",
"field": {
"type": "fieldAccess",
"fieldName": "sketch"
}
},
{
"type": "momentSketchMin",
"name": "min",
"field": {
"type": "fieldAccess",
"fieldName": "sketch"
}