
FilterItems
Filter a file by retaining only the items that match a given expression.
Filter a file by retaining only the items that match a given expression.
Filter a file by retaining only the items that match a given expression.
type: "io.kestra.plugin.core.storage.FilterItems"Examples
tasks:
- id: filter
type: io.kestra.plugin.core.storage.FilterItems
from: "{{ inputs.file }}"
filterCondition: " {{ value == null }}"
filterType: EXCLUDE
errorOrNullBehavior: EXCLUDE
Properties
filterCondition*RequiredNon-dynamicstring
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.
from*Requiredstring
The file to be filtered
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
errorOrNullBehaviorstring
FAILFAILINCLUDEEXCLUDESpecifies the behavior when the expression fails to be evaluated on an item or returns null.
Use FAIL to throw the exception and fail the task, INCLUDE to pass the item through, or EXCLUDE to drop the item.
filterTypestring
INCLUDEINCLUDEEXCLUDESpecifies the action to perform with items that match the filterCondition predicate
Use INCLUDE to pass the item through, or EXCLUDE to drop the items.
Outputs
droppedItemsTotalinteger
The total number of items that were dropped by the task
processedItemsTotalinteger
The total number of items that were processed by the task
uristring
uriThe filtered file URI