GroupBy Query on a spec having many multi valued dimensions

Hi Team,

We have many multi value dimensions in our spec, Lets take the below example

Event 1 => ts=2017-02-14T16:00:00.000, dimA=[100,101,102,103],dimB=[200,201,202,203]

Event 2 => ts=2017-02-14T17:00:00.000, dimA=[100,101],dimB=[203,204]

Query Requirements:

Doing a group by on dimA and listFiltering for “101”, Can I get the other dimension also in the counts as mentioned below

[

{

“version”: “v1”,

“timestamp”: “2017-02-14T00:00:00.000Z”,

“event”: {

“count”: 2,

“dimA”: “101”,

“dimB”: “203”

}

},

{

“version”: “v1”,

“timestamp”: “2017-02-14T00:00:00.000Z”,

“event”: {

“count”: 1,

“dimA”: “101”,

“dimB”: “204”

}

}

]

Please let me know if the above result can be achieved using the current multi value dimension group by query

Thanks,

Sathish

Hi Team,

A gentle reminder, so that this post doesn’t get lost

Thanks,

Sathish

I’m wondering whether what you want is topN. Have you looked at it? http://druid.io/docs/latest/querying/topnquery.html

Have you tried to group by both dimA and dimB? In sql language, you should group by both dimA and dimB to use dimA and dimB in select clause like : select dimA,dimB,count from table group by dimA,dimB where dimA=“101”

在 2017年2月16日星期四 UTC+8上午10:44:29,Sathish Srinivasan写道: