Remove
Synopsis
Removes one or more fields from the document. Can handle both single fields and arrays of fields to remove.
Schema
remove:
- field: <ident|ident[]>
- description: <text>
- if: <script>
- ignore_failure: <boolean>
- ignore_missing: <boolean>
- on_failure: <processor[]>
- on_success: <processor[]>
- tag: <string>
Configuration
Field | Required | Default | Description |
---|---|---|---|
field | Y | - | Field or array of fields to remove |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | See Handling Failures |
ignore_missing | N | false | If true , continue silently if field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
The processor supports template variables in field names and can remove nested fields using dot notation.
When multiple fields are specified, the processor attempts to remove all of them. If ignore_missing
is set to true
, execution continues for the remaining fields even if a field removal fails.
Be careful when removing nested fields as it might affect the structure of your document. Always ensure parent fields exist before attempting to remove child fields.
Examples
Single Field
Remove a single field from the document... |
|
to avoid disclosing sensitive data: |
|
Multiple Fields
Remove multiple fields at once... |
|
cleaning up temporary fields: |
|
Templates
Remove fields using template variables... |
|
with dynamic field names: |
|
Error Handling
Handle missing fields gracefully... |
|
with appropriate errors: |
|