ever predicate: bool, [frame(...)]?

Keeps every row whose primary-key group had at least one row where the predicate evaluated to true inside the chosen time window.

On a Resource dataset, that keeps every interval for resources that matched the predicate at least once in scope; on other datasets with a primary key, a group is all rows sharing that key. The input must have a non-empty primary key (otherwise the compiler reports that the verb filters grouped rows and suggests filter instead). The predicate must be bool.

On temporal inputs without a second argument, the predicate is evaluated over the current query window. An optional frame limits how far backward and/or forward each row looks around its time; only back and/or ahead are allowed—start and end are rejected. For the opposite existential tests, use never or always.

Categories

Accelerable

ever 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

Keeps every row in primary-key groups where the string form of status_code matched a server-error regex at least once over the query window, using ever without a frame() argument.

Restricts the existential check to the trailing thirty minutes relative to each row’s time by supplying frame(back:30m) as the second argument.

Returns every row for primary-key groups where the numeric predicate was true on at least one row, including rows below the threshold, not only the rows that matched the predicate.


Did this page help you?