Keep First
Synopsis
Keeps first N characters of strings or N elements of arrays.
Schema
- keep_first:
field: <ident>
count: <integer>
target_field: <string>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | - | Source field containing string or array to process |
count | Y | - | Number of characters/elements to keep from the beginning |
target_field | N | Same as field | Target field to store result |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if operation fails |
ignore_missing | N | false | Skip processing if referenced field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |