never

Type of operation: Filter

Description

When the verb input is a Resource dataset, never selects all resources that at no point matched the predicate. never 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. never selects all groups where none of the rows in the group match the predicate.

Usage

never predicate, [ frame ]

Argument

Type

Optional

Repeatable

Restrictions

predicate

bool

no

no

none

frame

frame

yes

no

constant

Accelerable

never 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

never string(status_code) ~ /^5.*/

Select only resources where the status_code column, converted to string, never started with 5, at any point of the query time window. This formulation is not accelerable.

never string(status_code) ~ /^5.*/, frame(back: 30m)

Select only resources where the status_code column, converted to string, never started with 5, within the last half hour. This formulation is accelerable because the frame(back:30m) argument specifies a relative time range to check.

never 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 was not below 20000000 at any point in time, and returns all rows for the selected “deviceId”s.