Can you update attribute using replace text of an attribute's value?
I have an attribute - ${a} which has a place holder called "PLACEHOLDER". How do I replace each occurrence of the word "PLACEHOLDER" in attribute ${a} with the value of attribute ${b}?
I have tried using replace text processor - using both Regex Replace and Literal Replace replacement strategies without any luck. See below my example. 1. Generate flow file.
Replace text attempt 1 - literal replace strategy
Replace text attempt 2 - regex replace strategy
None works as attribute value is unchanged.
How can I achieve this? If not this processor, which one please? How? Thanks in advance!
Haha...Such a bummer. Found the answer. Should have kept digging through the documentation i guess. Use update attribute processor then set attribute to ${a:replace('PLACEHOLDER', ${b})} Hope this helps someone who's not searched documentation properly like me in future :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With