Dot Nester
Synopsis
Converts nested structures into flattened ones using dot notation for field names.
Schema
dot_nester:
- field: <ident>
- format: <string>
- target_field: <ident>
- delimiter: <string>
- depth: <numeric>
- description: <text>
- if: <script>
- ignore_failure: <boolean>
- ignore_missing: <boolean>
- on_failure: <processor[]>
- on_success: <processor[]>
- tag: <string>
Configuration
| Field | Required | Default | Description |
|---|---|---|---|
field | N | - | Field containing the nested object to flatten. If empty or omitted, flattens the entire document |
format | N | - | Output format: ecs, cim, asim, cef, leef, csl. When not specified, maintains original case |
target_field | N | field | Field to store the flattened result. If not specified, overwrites the source field |
delimiter | N | . | Character(s) used to separate nested field names in the flattened result |
depth | N | -1 | Maximum nesting depth to flatten. Use -1 for unlimited depth |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | If true, errors are ignored |
ignore_missing | N | false | If true, missing fields are skipped |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
The processor is used for log normalization, schema conversion, and deep object simplification.
You can use target_field when you need to preserve the original structure, set an appropriate depth for the nesting level, and select a delimiter based on your naming convention.
Available formats to comply with specific schema conventions:
Default (no format) - Preserves original field name casing, e.g. User.FirstName.LastName, and uses the specified delimiter. Defaults to dot notation.
ASIM - Preserves original field name casing, e.g. User.FirstName.LastName. See Appendix for details.
ECS - Converts all field names to lowercase, e.g. user.firstname.lastname, and uses the specified delimiter. Defaults to dot notation. See Appendix for details.
CIM - Converts all field names to lowercase, e.g. user.firstname.lastname. See Appendix for details.
Only mapped objects are flattened. Non-map values will cause an error unless ignore_failure is set to true.
Examples
Documents
All nested structures in the document... | |
are flattened: | |
Fields
Nested objects... | |
are flattened with dot notation: | |
Delimiter
Using underscore as delimiter... | |
separates paths: | |
Depth
Limiting the depth... | |
flattens only at the specified level: | |
Conditions
Specific criteria limits flattening... | |
only with fields that meet them: | |
Formats
Using the ECS format... | |
converts field names to lowercase: | |