Skip to content

Expand

Expand (expand)

expand data in various ways: events, XML, multiline events.

Transform json

Minimal example

actions:
- expand:
mode:
csv: {}
JSON
{
"actions": [
{
"expand": {
"mode": {
"csv": {}
}
}
}
]
}

Contents

General

General
FieldTypeRequiredDescription
descriptionstringdescribe this step.
conditionlua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()
delimstringOptional delimiter used for multiline expansion helpers.
suppress-warningsboolean (bool)Suppress warnings generated by this action.
Default: false

Input

Input
FieldTypeRequiredDescription
input-fieldfield (string)Select an input field to expand instead of using the full event.
Examples: data_field
document-modeboolean (bool)Treat each document as a standalone expansion boundary.
Default: false

Mode

Mode
FieldTypeRequiredDescription
modeExpand ModeExpansion strategy to apply.
Allowed values: csv, key-value, events, xml, multiline, json

Output

Output
FieldTypeRequiredDescription
removeboolean (bool)Remove the source field once expansion is complete.
Default: false

Schema

Expand Mode Options

OptionNameTypeDescription
csvCsvobjectParse delimited payloads into structured records.
key-valueKey ValueobjectParse key=value formatted payloads.
eventsEventsobjectSplit embedded arrays or records into multiple events.
xmlXmlobjectExpand XML arrays into individual events.
multilineMultilinemapSplit multi-line text payloads using the delimiter map.
jsonJsonboolTreat payload as JSON lines (true) or arrays (false).
Default: false

Expand Mode - Csv - Header Fields Fields

FieldTypeRequiredDescription
header-fieldfield (string)Field containing header (CSV column names).
Examples: data_field
header-field-typesboolean (bool)Field containing header has types specified (with name:type format).
Default: false
header-field-on-changeboolean (bool)With ‘header-field, only write out headers if columns change.<br>Default: false`
null-valuestringA subSstitute string value to be used in the event that a field is null.

Expand Mode - Csv Fields

FieldTypeRequiredDescription
relaxed-schemaboolean (bool)Default: false
headerboolean (bool)Default: false
gen-headersboolean (bool)Default: false
autoconvertboolean (bool)Default: true
fieldsmap (string)
field-filepath (string)Examples: /path/to/file, c:\users\joe\data\file.txt
header-fieldsHeader Fields

Expand Mode - Key Value Fields

FieldTypeRequiredDescription
autoconvertboolean (bool)Default: false
key-value-delimstringDefault: =
multipleMultipleAllowed values: first, last, array

Expand Mode - Events Fields

FieldTypeRequiredDescription
output-split-fieldfield (string)Examples: data_field
skip-listregex[] (string)JSON Pointer patterns (regex) to skip flattening when splitting events.
Examples: \d+[A-Z]*
exclude-non-empty-arraysboolean (bool)Default: false

Expand Mode - Xml Fields

FieldTypeRequiredDescription
arraysstring[]List of fields in an xml payload to be expanded into separate events.

Expand Mode - Csv - Fields Table

FieldType
event.fieldstr

Key format: field.

Expand Mode - Multiline Table

FieldRegex
event.field^pattern$

Key format: field. Value format: regex.

Expand Mode - Key Value - Multiple Options

ValueNameDescription
firstfirstFirst
lastlastLast
arrayarrayArray