- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Apache Nifi - How do I change a value of a window variable during my workflow?
- Labels:
-
Apache NiFi
Created ‎12-12-2018 02:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apache Nifi - How do I change a value of a window variable during a workflow? Which processor should I use? What syntax?
Created ‎12-12-2018 04:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you mean by "window variable"? Do you mean a Process Group Variable? If so, you can change it via the UI or REST API (I believe the endpoint is /nifi-api/process-groups/<id>/variable-registry/update-requests). Note that it will stop any affected processors or controller services, then change the variable value, then restart/re-enable the affected components.
If you mean a Flow File attribute, you can add/change/delete those using the UpdateAttribute processor.
Created on ‎12-12-2018 04:56 PM - edited ‎08-17-2019 03:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Matt, I mean a group variable. In my flow, I need to save the value of an attribute at the beginning of the stream to reuse it from the middle of the stream in processor ReplaceText, after a GetMongo processor, however, after I create the variable I can not update the value of that variable. I also tried to save the content of this attribute in state value, however, I can not retrieve it later. Look at this example in the attached image. Thank you!
Created ‎07-01-2020 03:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot share states between processor, each processor has it's own state.
