Skip to main content
Version: 1.x

Split

Filter plugin : Split​

Description​

Splits String using delimiter.

Options​

nametyperequireddefault value
delimiterstringno" "(Space)
fieldslistyes-
source_fieldstringnoroot
target_fieldstringnoraw_message
delimiter [string]​

The string to split on. Default is a whitespace.

fields [list]​

The corresponding field names of splited fields. Order of field names is important.

If the length of fields is greater than the length of splited fields, the extra fields will be set to empty string.

source_field [string]​

Source field, default is raw_message.

target_field [string]​

New field name, default is __root__, and the result of Split will be added on the top level of Rows.

If you specify target_field, the result of 'Split' will be added under the top level of Rows.

Examples​

split {
source_field = "message"
delimiter = "&"
fields = ["field1", "field2"]
}

The string of message is split by &, and the results set to field1 and field2.

split {
source_field = "message"
target_field = "info"
delimiter = ","
fields = ["field1", "field2"]
}

The string of message is split by &, and the results set to info.field1 and info.field2