Druid Not Giving Missing segment in an interval by Zero Filling

323 views
Skip to first unread message

Pravesh Gupta

unread,
Mar 10, 2017, 12:48:34 AM3/10/17
to Druid User
Hi,
I have encountered a case when I am not getting zero filled segments in the timeseries output query (Which Ofcourse lies inside my interval of query). 

Just for more info on this :

My interval is like 
"intervals": [
"2017-02-24T00:00:00.000/2017-02-25T00:00:00.000"
],

Time Buckets are hourly granuality based.

And in Druid when i checked , there was no segment file for 6-7 PM and 7-8 PM.

But In the output I should get the result for above hours also , with zero filled , right ? My skipEmptyBuckets is set to false.

This looks to be a Druid Bug to me at first go.

Can Some one please help?

Thanks,
Pravesh Gupta

pja...@yahoo-inc.com

unread,
Mar 10, 2017, 5:50:44 PM3/10/17
to Druid User
what granularity are you using while doing the query ? To get hourly buckets you need to use "hour" granularity in the query.

Pravesh Gupta

unread,
Mar 10, 2017, 11:10:51 PM3/10/17
to Druid User
Yes My Granuality in query is also hour .

Pravesh Gupta

unread,
Mar 16, 2017, 7:37:32 AM3/16/17
to Druid User
Can anyone help here ?

Thanks,
Pravesh Gupta

Nishant Bangarwa

unread,
Mar 16, 2017, 8:30:47 AM3/16/17
to Druid User
Hi Pravesh, 
It would be helpful for us if you can share druid version, complete query and the sample results you are getting. 


--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+...@googlegroups.com.
To post to this group, send email to druid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-user/b53d103c-1996-44cb-80d0-a00b0b56d09f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pravesh Gupta

unread,
Mar 16, 2017, 8:43:54 AM3/16/17
to Druid User
Following are the required details :

Druid Version : 0.9.1.1

Hi,
I have following Druid TimeSeries Query (Granularity Hour in a Day):
{
"queryType": "timeseries",
"dataSource": "ds1",
"granularity": {
"type": "period",
"period": "PT1H",
"origin": "2017-02-24T00:00:00.000"
},
"descending": "false",
"intervals": [
"2017-02-24T00:00:00.000/2017-02-25T00:00:00.000"
],
"aggregations": [
{
"type": "longSum",
"name": "aggr1Name",
"fieldName": "eventCount"
}
],
"context": {
"queryId": "1487933258401_103_0.7445333478096735"
}
}

As per Above Druid Query, I am expecting to receive all the Segments (24 in total corresponding to 24 hours in a day ) in the Druid Output, but However I am getting only 21 segments ,no pattern in the output as well.

Following is the Druid Output:
[
  {
    "timestamp": "2017-02-24T00:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T01:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T02:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T03:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T04:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T05:00:00.000Z",
    "result": {
      "columnKey": 19
    }
  },
  {
    "timestamp": "2017-02-24T06:00:00.000Z",
    "result": {
      "columnKey": 16
    }
  },
  {
    "timestamp": "2017-02-24T07:00:00.000Z",
    "result": {
      "columnKey": 15
    }
  },
  {
    "timestamp": "2017-02-24T08:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T09:00:00.000Z",
    "result": {
      "columnKey": 8
    }
  },
  {
    "timestamp": "2017-02-24T10:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T11:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T12:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T13:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T14:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T15:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T16:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T17:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T18:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T21:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  },
  {
    "timestamp": "2017-02-24T22:00:00.000Z",
    "result": {
      "columnKey": 0
    }
  }
]



On Friday, 10 March 2017 11:18:34 UTC+5:30, Pravesh Gupta wrote:

Pravesh Gupta

unread,
Mar 18, 2017, 7:09:15 AM3/18/17
to Druid User
Any Help Please ??


Thanks,
Pravesh Gupta


On Friday, 10 March 2017 11:18:34 UTC+5:30, Pravesh Gupta wrote:

Nishant Bangarwa

unread,
Mar 20, 2017, 5:44:41 AM3/20/17
to Druid User
Hi Pravesh, 
your query looks fine. Can you also try with "granularity" : "hour" instead of period granularity. I wonder if that is causing it ? 

--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+...@googlegroups.com.
To post to this group, send email to druid...@googlegroups.com.

Pravesh Gupta

unread,
Mar 21, 2017, 6:54:00 AM3/21/17
to Druid User
No that doesnt seem to work as well.
I am able to reproduce this issue for minute as well, though my segment are hourly sized. Some minutes in an hour are also not comming up from Druid.

Following is the Druid Query :
{
"queryType": "timeseries",
"dataSource": "campaign_reporting_event_shared_ds_1",
"granularity":"minute",
"descending": "false",
"intervals": [
"2017-03-05T00:00:00.000/2017-03-06T00:00:00.000"
],
"aggregations": [
{
"type": "longSum",
"name": "total_delivered_BF60E684-D0F3-FC9D-8668-53AB27028DD5",
"fieldName": "eventCount"
}
],
"context": {
"queryId": "1490085055687_2196_0.6030748523107982"
}
}

I am supposed to get 24 * 60 =  Elements in the druid output , but I am getting only 256. Attaching the Druid Output in a file.

Is this some known issue on the Druid ??


Please help. Thanks in advance.

On Friday, 10 March 2017 11:18:34 UTC+5:30, Pravesh Gupta wrote:
output.txt
Reply all
Reply to author
Forward
0 new messages