Filter Component
Prune and refine your dataset by applying logical conditions to specific fields.
Last updated:
The Filter Component is a core component for data pruning. It allows you to define one or more conditions that a record must meet to pass through to the next component in the pipeline.
โ๏ธ Configuration
| Property | Type | Description |
|---|---|---|
Field Path | string | The JSON path to the field you want to evaluate (e.g., user.age). |
Operator | enum | The logical operator to apply (equals, greater than, regex, etc.). |
Value | any | The target value to compare against. |
๐ Supported Operators
- Numeric:
>,<,>=,<=,equals,not_equals - String:
contains,not_contains,starts_with,ends_with,regex - Existence:
exists(field is present and not null),empty(field isnull,undefined, or an empty string/array)
๐ก Example
If you want to filter a list of users to find only those from the "Engineering" department who are older than 30:
- Path:
department| Operator:equals| Value:Engineering - Path:
age| Operator:>| Value:30
๐ Best Practices
- Use Regex for complex patterns: The filter component supports full JavaScript regular expressions.
- Nested paths: Use dot notation to reach deep fields (e.g.,
profile.settings.notifications.enabled). - Data types: Ensure your comparison value matches the type of the field (e.g., don't compare a string "30" to a numeric age field if strict equality is required).