Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to Change Content of flowfile provided property name dynamically.

avatar
Contributor

Hi,

I want to change the flowfile content (json format) using UpdateRecord by providing property (to be change) from attribute.

Here is the flowfile content 

mohdriyaz_0-1713685742848.png     

here is the flowfile attribute 

mohdriyaz_1-1713685829562.png

I want to change the value of "id"  in flowfile content using UpdateRecords like this : 

( WHICH IS NOT WORKING )

mohdriyaz_2-1713685901848.png

 

This works but add a new property to existing flow file 

mohdriyaz_0-1713686303606.png

mohdriyaz_1-1713686349403.png

Here "id" got change because i provided "/id" (hardcoded property name) , i need same functionality to work with "/${col_name}"

 

Any Pointers ... ?????

Thanks,

Riyaz

1 ACCEPTED SOLUTION

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
2 REPLIES 2

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Contributor

Used Option2 - Groovy script for this scenario.