- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Replace Multiple Character with UpdateRecord in Apache NiFi
- Labels:
-
Apache NiFi
Created ‎01-25-2023 11:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
All I want to do is replace multiple character in a field's value.
The text in the field is:
'I have different characters'
If I try ${field.value:replace('a', 'i')} it works. The output is 'I hive different chiricters'
Bu I want to replace one more character. How can I do this in same processor.
I have tried someting like ${field.value:raplace('a', 'i'); field.value:replace('e', 'u')}
I couln't find the right syntax. Please help.
Created ‎01-25-2023 12:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I think the right syntax will be :
${field.value:raplace('a', 'i'):replace('e', 'u'):replace(...)}
Hope that helps.
Thanks
Created ‎01-25-2023 12:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I think the right syntax will be :
${field.value:raplace('a', 'i'):replace('e', 'u'):replace(...)}
Hope that helps.
Thanks
Created ‎01-25-2023 10:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Samsal. I have tried different combinations but I am suprised I did not try this one. This is javascript syntax, right? If I learn beginner level javascript, is it going to be easier to use NiFi's expression language?
Created ‎01-26-2023 06:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You dont need to have programming language to learn Expression Language. It can help but its not required.
