Choose Whether to Enable Rollup Support
Rollup support changes what a persisted aggregation stores, which functions it accepts, and how you read it. Decide whether you want to use rollup support before you create the persisted aggregation, because you cannot change this setting afterward.
Enable rollup support when you expect to aggregate the results further, for example by reading daily or weekly values from an hourly persisted aggregation.
Leave rollup support disabled when the persisted aggregation serves as a time series cache for a computation.
Table: Persisted aggregations with and without rollup support
| Feature | Without rollup support | With rollup support |
|---|---|---|
| Stored data | Result events for each interval. | The state of the first aggregate function for each interval. |
| Precision | Each interval is precise on its own. Combining intervals yourself is cumbersome. |
Rolling up intervals is fully precise for any function that
rollup support allows. For example, avg()
is fully precise at any time scale.
|
| Reading results |
readPersistedAggregation() returns results
at the schedule interval. You cannot use
span
or
timezone.
|
readPersistedAggregation() requires
span
and
timezone.
The span must be a positive multiple of the schedule interval.
Only UTC and equivalent
fixed-zero-offset time zones are supported. See
Persisted Aggregation with Rollup Support.
|
| Required read parameters |
tag
and
view.
|
tag,
view,
span,
and
timezone.
|
| Result buckets | Returns buckets as originally computed and stored. You decide the bucket span when you create the persisted aggregation. | Returns buckets aggregated to the span that you specify. You decide the minimum bucket span when you create the persisted aggregation. |
| First aggregate function | Any supported aggregate function. | One of the functions in Allowed First Aggregate Functions. |
| Approximation and enrichment functions | No additional restrictions. |
percentile() and top()
are not supported. Enrichment functions such as
match() are allowed only before the first
aggregate function. See
Function Restrictions.
|
| Aggregation interval | All available intervals. | Fixed-length intervals only. Intervals that vary in length, such as Monthly and Yearly, are not supported. |
| Wait time | Configurable for timestamp queries. See Offset. | Not available. The offset must be 0. In the API, the offset must be null or 0. |
| Enabling in the API |
Omit isRollupable or set it to
false. The default is false.
|
Set isRollupable to true
when you create the persisted aggregation.
|
| Changing the setting | You cannot enable rollup support after creation. | You cannot disable rollup support after creation. |