Search code examples
druid

Can I query data within an hour range for all days?


Using Apache Druid, is it possible to query all data within 11AM and 5PM for example, using the default timestamp field?


Solution

  • Sort of. You'd have to specify multiple intervals, one for each day:

    "intervals": [
      "2019-05-17T11:00:00Z/2019-05-17T17:00:00Z",
      "2019-05-18T11:00:00Z/2019-05-18T17:00:00Z",
      "2019-05-19T11:00:00Z/2019-05-19T17:00:00Z"
    ]