Base64 Decode
Synopsis
Decodes base64-encoded strings into UTF-8 text using standard base64 encoding, compatible with Kusto's base64_decode_tostring() function.
Schema
- base64_decode:
field: <ident>
target_field: <ident>
description: <text>
disabled: <boolean>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | Source field containing base64-encoded data | |
target_field | N | Same as field | Target field to store decoded text |
description | N | Explanatory note | |
disabled | N | false | Disable processor execution |
if | N | Condition to run | |
ignore_failure | N | false | Continue processing if decoding 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 |
Details
Decodes base64-encoded strings using standard base64 encoding (RFC 4648). The processor validates UTF-8 encoding of decoded output and sets the target field to null for invalid UTF-8 sequences, matching Microsoft Kusto's base64_decode_tostring() behavior.
Encoding Validation: Uses base64.StdEncoding (standard base64 alphabet with padding). Invalid base64 strings cause processor failure unless ignore_failure is enabled.
UTF-8 Handling: After successful base64 decoding, validates that the decoded bytes form valid UTF-8. If UTF-8 validation fails, sets target field to null instead of returning invalid text. This ensures decoded output contains only valid UTF-8 strings.
Target Field Behavior: When target_field is not specified, overwrites the source field with decoded result. When specified, creates a new field while preserving the original base64-encoded value.
Empty String Handling: Empty strings decode successfully to empty strings. Null field values cause failure unless ignore_missing is enabled.
Examples
Basic Base64 Decoding
Decoding base64 string to separate field... | |
Creates new field with decoded text... | |
In-Place Decoding
Decoding and replacing original field... | |
Overwrites source field with decoded value... | |
Special Characters and Unicode
Decoding text with special characters and unicode... | |
Handles unicode characters correctly... | |
Invalid UTF-8 Handling
Processing base64 that decodes to invalid UTF-8... | |
Sets field to null for invalid UTF-8... | |
Error Handling with Invalid Base64
Ignoring decoding failures for invalid input... | |
Processing continues despite invalid base64... | |
Missing Field Handling
Skipping processing when field doesn't exist... | |
Processing continues without error... | |