You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@druid.apache.org by GitBox <gi...@apache.org> on 2018/07/19 09:29:59 UTC

[GitHub] sascha-coenen opened a new issue #6023: Full ISO 8601 compatibility in query intervals

sascha-coenen opened a new issue #6023: Full ISO 8601 compatibility in query intervals
URL: https://github.com/apache/incubator-druid/issues/6023
 
 
   The current Druid documentation states in several places that queries have a mandatory "intervals" or "interval" attribute which can contain ISO-8601 compatible intervals.
   
   For instance the documentation on the groupby query (http://druid.io/docs/latest/querying/groupbyquery.html)
   states: "intervals : A JSON Object representing ISO-8601 Intervals. This defines the time ranges to run the query over"
   
   According to the following wikipedia source (https://en.wikipedia.org/wiki/ISO_8601#Time_intervals), there are four valid forms of ISO-8601 intervals:
   > 
   > <start>/<end>
   > <start>/<duration>
   > <duration>/<end>
   > <duration>
   > 
   
   It seems that Druid only supports the first three variants. When specifying a duration only, e.g. "P2D", then  Druid returns an exception saying that the "/" character is required within each interval. 
   
   I believe that supporting the last interval format which is a duration relative to the current time (or latest data present in Druid) would be a very useful addition. Most queries involve relative dateranges. If forcing people to use absolute dates, every query needs to be templated such that the timeintervals gets computed by some external logic and then inserted into the query. If the relative duration format was supported, many queries could work without the need of templated injections of external metadata.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org
For additional commands, e-mail: dev-help@druid.apache.org