Replace
Last updated
Last updated
Replace transform plugin
Examines string value in a given field and replaces substring of the string value that matches the given string literal or regexes with the given replacement.
replace_field
string
yes
pattern
string
yes
-
replacement
string
yes
-
is_regex
boolean
no
false
replace_first
boolean
no
false
The field you want to replace
The old string that will be replaced
The new string for replace
Use regex for string match
Whether replace the first match string. Only used when is_regex = true
.
The data read from source is a table like this:
Joy Ding
20
123
May Ding
20
123
Kin Dom
20
123
Joy Dom
20
123
We want to replace the char to _
at the name
field. Then we can add a Replace
Transform like this:
Then the data in result table fake1
will update to
Joy_Ding
20
123
May_Ding
20
123
Kin_Dom
20
123
Joy_Dom
20
123
Transform plugin common parameters, please refer to for details