Description Usage Arguments Details Value Examples
Specifies a Druid query granularity using a simple string, a numerical duration or an ISO period
1 2 |
str |
a string or number representing a granularity (e.g. "day", "hour", "minute", "all", "none", 3600, "P1M", "PT1H") |
period |
granularity specified as an ISO period |
duration |
granularity specified as a duration in seconds |
origin |
timestamp to start computing intervals from |
timeZone |
optional time zone to define period granularities specified as a IANA time zone string, e.g. "America/Los_Angeles" |
Granularities can be specified in several ways:
- as a simple string: "day", "hour", "minute", "all", "none"
- as a number, representing the number of seconds in each period
- as an ISO period, such as "P1M", "P1W", PT1H", etc.
a Druid granularity object
1 2 3 4 5 | granularity("day")
granularity("PT6H", timeZone="America/Los_Angeles")
granularity(3600 * 2, origin=ymd_hms("2013-01-01T01:00:00"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.