always
always predicate: bool, [frame(...)]?
When the verb input is a Resource dataset, always selects all resources that matched the predicate at all times.
always may also be applied to a non-Resource dataset if it has a primary key. In that case, the primary key identifies groups of rows. always selects all groups where every row in the group matches the predicate.
Categories
Accelerable
always is accelerable if there is a frame() argument. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.
Examples
always string(status_code) ~ /^2.*/
Select only resources where the status_code column, converted to string, always started with 2, at all points of the query time window. This formulation is not accelerable.
always string(status_code) ~ /^2.*/, frame(back: 30m)
Select only resources where the status_code column, converted to string, started with 2, at all times in the last half hour. This formulation is accelerable because the frame(back:30m) argument specifies a relative time range to check.
always bytesUsed > 20000000
Assume the verb input is an Event dataset representing memory usage metrics. The input dataset has a Valid From field "timestamp", a primary key ("deviceId"), and an additional column "bytesUsed". The OPAL selects the "deviceId"s for which bytesUsed is above 20000000 at all times, and returns all rows for the selected "deviceId"s.
Updated 8 days ago