Dot Expander
Synopsis
Expands fields containing dots in their names into nested objects.
Schema
dot_expander:
- field: <ident>
- path: <string>
- description: <text>
- if: <script>
- ignore_failure: <boolean>
- on_failure: <processor[]>
- on_success: <processor[]>
- tag: <string>
Configuration
Field | Required | Default | Description |
---|---|---|---|
field | Y | - | Field containing dot-separated names to expand |
path | N | - | Target location for expanded structure |
description | N | - | Explanatory note |
if | N | - | Conditional expression |
ignore_failure | N | false | Continue processing on errors |
on_failure | N | - | Processors to run on failure |
on_success | N | - | Processors to run on success |
tag | N | - | Identifier for logging |
Details
Functionality
The Dot Expander processor converts flat field names with dot notation into nested object structures. This is particularly useful for:
- Transforming flattened data into hierarchical formats
- Preparing data for nested processing
- Standardizing field structures across different data sources
Key Behaviors
- Automatically creates intermediate objects as needed
- Preserves original field values
- Removes the original dot-separated field
- Supports custom target paths for expanded structures
Use Cases
- Normalizing log data
- Preparing data for specific processing pipelines
- Converting flat configurations to nested formats
- Improving data readability and structure
Examples
Basic Field Expansion
Expand a dotted field into nested objects... |
|
creates a nested structure: |
|
Custom Path Expansion
Place expanded structure at specific path... |
|
creates structure at specified location: |
|
Conditional Expansion
Expand only when condition is met... |
|
expands when condition is true: |
|
Error Handling
When field doesn't contain dots... |
|
handles error gracefully: |
|
note
- The processor maintains the original data types during expansion
- Intermediate objects are created automatically
- The original dot-separated field is removed
warning
- The field must contain at least one dot
- Nested expansions create complex object structures
- Be cautious with deeply nested fields to avoid performance issues