Skip to main content

Rill ISO 8601 Extensions

Rill supports a set of legacy rill- prefixed keywords for common time ranges. These are retained for backward compatibility with existing configurations.

New Syntax Available

For new configurations, use the modern Time Range Syntax, which is more expressive and consistent across all contexts.

Time Range Extensions

Rill ExtensionDescription
infAll time
rill-TDToday
rill-WTDWeek to Date
rill-MTDMonth to Date
rill-QTDQuarter to Date
rill-YTDYear to Date
rill-PDCYesterday (Previous Day Complete)
rill-PWCPrevious Week Complete
rill-PMCPrevious Month Complete
rill-PQCPrevious Quarter Complete
rill-PYCPrevious Year Complete
Reference point behavior

In a dashboard context, the reference point for these expressions is latest (most recent data timestamp). In alert contexts, the reference point is watermark (data completeness marker).

Time Comparison Extensions

These extensions are used specifically in comparison contexts (the "Comparing" feature in dashboards).

Rill ExtensionDescriptionUsage
rill-PPPrevious PeriodCompares against the immediately preceding period of same duration
rill-PDPrevious DayCompares against the same time yesterday
rill-PWPrevious WeekCompares against the same time last week
rill-PMPrevious MonthCompares against the same time last month
rill-PQPrevious QuarterCompares against the same time last quarter
rill-PYPrevious YearCompares against the same time last year

Usage Context

As Time Range

Extensions ending in TD (to-date) or C (complete) are valid as primary time ranges:

# In metrics view or explore configuration
default_time_range: "rill-MTD" # Month to date

As Comparison

Extensions starting with rill-P (previous) are typically used for comparisons:

# In explore configuration
default_comparison:
dimension: "" # No dimension comparison
mode: time

Then select "Previous Period", "Previous Day", etc. in the dashboard UI.

ISO 8601 Duration Support

Rill also supports standard ISO 8601 duration format:

FormatDescriptionExample
P<n>Yn yearsP1Y = 1 year
P<n>Mn monthsP6M = 6 months
P<n>Wn weeksP2W = 2 weeks
P<n>Dn daysP7D = 7 days
PT<n>Hn hoursPT24H = 24 hours
PT<n>Mn minutesPT30M = 30 minutes
PT<n>Sn secondsPT60S = 60 seconds

Combined durations:

  • P1Y6M = 1 year and 6 months
  • P1DT12H = 1 day and 12 hours
  • PT1H30M = 1 hour and 30 minutes

Migration to Modern Syntax

The modern syntax provides equivalent functionality with more flexibility. One important distinction: DTD supports intraday ranges (e.g., ref/D to ref/h+1h) while rill-TD does not.

LegacyModern Equivalent
rill-TDDTD
rill-WTDWTD
rill-MTDMTD
rill-QTDQTD
rill-YTDYTD
rill-PDC1D as of watermark/D
rill-PWC1W as of watermark/W
rill-PMC1M as of watermark/M
rill-PQC1Q as of watermark/Q
rill-PYC1Y as of watermark/Y
P7D7D
P1M1M or 30D

See Time Range Syntax for the complete modern syntax reference.