Filter a file by retaining only the items that match a given expression.
type: "io.kestra.plugin.core.storage.FilterItems"
tasks:
- id: filter
type: io.kestra.plugin.core.storage.FilterItems
from: "{{ inputs.file }}"
filterCondition: " {{ value == null }}"
filterType: EXCLUDE
errorOrNullBehavior: EXCLUDE
NO
The 'pebble' expression used to match items to be included or excluded.
The 'pebble' expression should return a BOOLEAN value (i.e. true
or false
). Values 0
, -0
, and ""
are interpreted as false
. Otherwise, any non empty value will be interpreted as true
.
YES
The file to be filtered.
Must be a kestra://
internal storage URI.
YES
FAIL
FAIL
INCLUDE
EXCLUDE
Specifies the behavior when the expression fail to be evaluated on an item or return null
.
Use FAIL
to throw the exception and fail the task, INCLUDE
to pass the item through, or EXCLUDE
to drop the item.
YES
INCLUDE
INCLUDE
EXCLUDE
Specifies the action to perform with items that match the filterCondition
predicate
Use INCLUDE
to pass the item through, or EXCLUDE
to drop the items.
The total number of items that was dropped by the task.
The total number of items that was processed by the task.
uri
The filtered file URI.