Replace
Filter plugin : Replaceâ
- Author: InterestingLab
- Homepage: https://interestinglab.github.io/seatunnel-docs
- Version: 1.0.0
Descriptionâ
Replaces field contents based on regular expression.
Optionsâ
name | type | required | default value |
---|---|---|---|
pattern | string | yes | - |
replacement | string | yes | - |
source_field | string | no | raw_message |
target_field | string | no | replaced |
pattern [string]â
regular expression, such as [a-z0-9], \w, \d
Regular expression used for matching string, such as "[a-zA-Z0-9_-]+"
.Please see Regex Pattern for details.
You can also go to Regex 101 to test your regex interactively.
replacement [string]â
String replacement.
source_field [string]â
Source field, default is raw_message
.
target_field [string]â
New field name, default is replaced
.
Examplesâ
replace {
target_field = "tmp"
source_field = "message"
pattern = "\w+"
replacement = "are"
}
Replace \w+ in
message
with are and set it totmp
column.