Functions, operators, and Channel references in Sift’s CEL expressions.
Use this page to look up CEL expression syntax in Sift. Expressions are written using a subset of Common Expression Language (CEL) and are used in Calculated Channels, Rules, and User-Defined Functions. Sift supports a subset of CEL data types and operators, not the full CEL specification.
When configuring a Rule, Calculated Channel, or User-Defined Function, you select input Channels by name from the Input Channels selector.Sift automatically assigns each selected Channel a shorthand variable based on selection order: $1 for the first Channel, $2 for the second, $3 for the third, and so on. Use these variables to reference the corresponding Channel in your expression.
Math functions take numeric arguments, such as Channel references ($1) or number literals, and apply to a single data point at a time. Use them to convert units, combine Channels, or check for invalid values.
min() and max() accept from 2 to 10 arguments and return the smallest or largest of them at each data point. To find the minimum or maximum of one Channel over time, use the stateful forms min(x, rolling(y)) and max(x, rolling(y)) described in Stateful functions.
Stateful functions compute values from the current data point and the data points before it. Use them to track trends, detect gradual changes, and compute time-based metrics across telemetry data.
File functions allow Rules and Calculated Channel expressions to access data from files attached to an Asset or a Run. Once a file is loaded, you access specific values using bracket notation. The syntax depends on the file format.
Live Rules: File functions are not supported in live Rule evaluation.
The following table lists the available file functions:
JSON and YAML files resolve to a map. Use bracket notation to index into keys. For nested objects, chain brackets. To access an item in a list, use a numeric index.
The User-Defined Functions section of the expression editor lists all named, reusable functions created across your organization. Call any function by name directly in your expression. To learn more, see User-Defined Functions settings.