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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to