metricSpec - what does it mean in detail ?

Hello,
{
“type”: “doubleMax”,
“name”: “X”,
“fieldName”: “X”
}

``

I think about groupBy queries.
It is my metric. It seems that I can only query about doubleMax for some dimension. However, I can ask about sum(X), min(x) for some dimension.
What’s up ? I don’t understand point of metric, for me it should be:
{
“name”: “X”,
“fieldName”: “X”
}

``

Hi Tomek,

Druid requires that you provide aggregators at both ingestion time and at query time. The ingestion time aggregators are used to decide how to combine rows together when roll-up occurs while the segment is being built (see Roll-Up here: http://druid.io/docs/latest/design/index.html), and the query time aggregators are used to combine already rolled-up rows according to your query. Like I believe you were pointing out, often times the ingestion time and query time aggregators on a given field would be the same to generate any meaningful results.

Ok, thanks for your answer. I understand that
{ "type": "doubleMax", "name": "X", "fieldName": "X" } make additional column with max - groupped by graunlarity and fieldName X. Now, queries about maximum of field X is very fast. However, we can ask about sum/min and more if fieldName X, but it won’t be as fast as maximum.

Am I wrong ?

W dniu środa, 17 lutego 2016 00:27:01 UTC+1 użytkownik Tom napisał:

Because of how roll-up works, the raw data will be lost at ingestion time, so if you only specified a doubleMax aggregator in your ingestion specification, you won’t be able to get the sum or min of the raw data later on. You could run a sum/min query on “X” as you’ve specified, but what you would get is the sum of the max values of each rolled-up row or the min of the max values of each rolled-up row which is probably not what you’re expecting. Hope this makes sense.

Thanks you very much!

W dniu sobota, 20 lutego 2016 01:03:55 UTC+1 użytkownik David Lim napisał: