Filter
Filters values from the input port using the given KelpQL expression predicate.
In-ports
input <any>
— input events to filter.
config JSON
(dynamic) — accepts a JSON object with configuration properties that can be set at runtime.
Out-ports
output <any>
— filtered events.
Overview
The Filter operator filters values received on the input port using the given KelpQL expression predicate.
By default, the @
expression is used, which means any value will be emitted.
Example 1
The following diagram demonstrates the use of the Filter operator on a stream of integer values with the expression mod(@, 2) == 0
to filter out only even numbers.
Settings
Enable realtime config port
If this setting is enabled, the component can be configured through the config port. This port accepts a configuration object as input and allows you to set dynamic properties at runtime. Note that using this port does not cause the component to reinitialize, but it may cause some previous state of the component to be lost.
Expression (expr
)
KelpQL expression that will be used as a predicate for the filter. Default expression is @
.
Type: String
Default: @
Required: Yes