granularity(str = NA, period = NA, duration = NA, origin = NA, timeZone = NA)
a Druid granularity object
Specifies a Druid query granularity using a simple string, a numerical duration or an ISO period
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.
granularity("day")druid granularity: daygranularity("PT6H", timeZone="America/Los_Angeles")druid granularity: period: PT6H origin: NA timeZone: America/Los_Angelesgranularity(3600 * 2, origin=ymd_hms("2013-01-01T01:00:00"))druid granularity: duration: 7200 origin: 2013-01-01T01:00:00.000+00:00