Skip to main content

Uppercase

Mutate Elastic Compatible

Synopsis

Converts string values to their uppercase equivalent.

Schema

uppercase:
- field: <ident>
- description: <text>
- if: <script>
- ignore_failure: <boolean>
- ignore_missing: <boolean>
- on_failure: <processor[]>
- on_success: <processor[]>
- tag: <string>
- target_field: <ident>

Configuration

FieldRequiredDefaultDescription
fieldY-Field containing string(s) to convert
descriptionN-Explanatory note
ifN-Condition to run
ignore_failureNfalseSee Handling Failures
ignore_missingNfalseIf true, quietly exit if field doesn't exist
on_failureN-See Handling Failures
on_successN-See Handling Success
tagN-Identifier
target_fieldNfieldField to store the converted value(s)

Details

The processor can handle both single string fields and arrays of strings. When processing an array, it converts each element to uppercase.

note

The processor uses the standard string uppercase conversion rules of the Go programming language, which handles Unicode characters appropriately.

warning

If the field contains non-string values, the processor will fail unless ignore_failure is set to true.

Examples

Single String

Converting the username to uppercase...

{
"username": "admin"
}
uppercase:
- field: username

capitalizes all characters:

{
"username": "ADMIN"
}

String Arrays

Processing an array of email addresses...

uppercase:
- field: emails

converts each element:

Target Field

Storing the uppercase values in a new field...

{
"original": "value"
}
uppercase:
- field: original
- target_field: uppercase

preserves the original:

{
"original": "value",
"uppercase": "VALUE"
}