Hi all,
I have the following groupBy query with an another groupBy nested.
{
“queryType”: “groupBy”,
“dataSource”: {
“type”: “query”,
“query”: {
“queryType”: “groupBy”,
“dataSource”: “my-events”,
“granularity”: “all” ,
“dimensions”: [“playerId”],
“aggregations”: [
{ “type”: “longFirst”, “name”: “first_time_event_by_player_timestampMillis”, “fieldName”: “timestampMillis” }
],
“intervals” : [“2019-12-20T00/2020-01-22T00”]
}
},
“granularity”: “day”,
“aggregations”: [
{ “type”: “count”, “name”: “total_first_events_by_day” }
],
“intervals” : [“2019-12-20T00/2020-01-22T00”],
“context”: {
“groupByStrategy”: “v1”
}
}
// Note that dimension “timestampMillis” contains the timestamp in milliseconds.
``
The issue that I am facing is that the granularity by day in the outer is not working as I’d expect. I am getting a unique row with the lower level of the nested groupBy when the nested query (executing isolated) return a lot rows in a wide time interval. It seems it doesn’t have a proper time reference.
I am a rookie in Druid. Maybe am I missing something?
Best regards
Jose Velasco