Don't skip empty timestamps?

Hi,

I’m trying to use a charting library which requires timestamps to be filled in.

I’m having tremendous difficulty converting all the responses and filling in all the keys with the proper dates and such.

I’m doing a TopN (1 dimension), and a few GroupBy (both 1 dimension and 2 dimension).

Is there a way I can have it fill anything that is missing with 0, including both a timestamp granualarity interval which might be missing, OR a particular dimension which was missing? (so that the data is consistent and I can just loop over it)

Thanks

In the timestamp spec, there is a hidden field called “missingValue” that can be used to fill in a default value for a timestamp if one is not present in the data set.

BTW, for an open source UI that provides exploratory analytics for Druid, check out https://github.com/implydata/pivot

Thanks for your reply. A few more side questions:

  1. Is that only for ingestion or can I use that when querying?

  2. does it work on groupby or only timeseries?

  3. Is it possible to use a timeseries query and have the result look like this:

{“timestamp”=>“2015-09-28T06:00:00.000Z”, “result”=>{“red”=>18, “blue” => 25}}

given a schema that looks like…

timestamp: xxx

color: (red/blue)

count: 1

Hi BreakfastCereal, see inline.

Thanks for your reply. A few more side questions:

  1. Is that only for ingestion or can I use that when querying?

This is on ingestion time. Every row ingested in Druid needs a timestamp, even if that timestamp is a dummy value. If you enter a dummy timestamp (e.g. 1970-01-01, or year 3000), during your queries you can just query for an actual time range you care about, and these values wil lbe not included in the result.

  1. does it work on groupby or only timeseries?
  1. Is it possible to use a timeseries query and have the result look like this:

{“timestamp”=>“2015-09-28T06:00:00.000Z”, “result”=>{“red”=>18, “blue” => 25}}

given a schema that looks like…

timestamp: xxx

color: (red/blue)

count: 1

Druid supports arrays for dimensions. For example, you can have “color” : [“red”, “blue”] when you ingest the data.