Split
Filter plugin : Splitâ
- Author: InterestingLab
- Homepage: https://interestinglab.github.io/seatunnel-docs
- Version: 1.0.0
Descriptionâ
Splits String using delimiter.
Optionsâ
name | type | required | default value |
---|---|---|---|
delimiter | string | no | " "(Space) |
fields | list | yes | - |
source_field | string | no | root |
target_field | string | no | raw_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 tofield1
andfield2
.
split {
source_field = "message"
target_field = "info"
delimiter = ","
fields = ["field1", "field2"]
}
The string of
message
is split by &, and the results set toinfo.field1
andinfo.field2