Support Questions

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

Apache NIFI - how I can change value of global variables

avatar
Rising Star

Hi all,

I am using Apache NIFI, how I can change/modify/replace value of global/environment variables?


6 REPLIES 6

avatar
Guru

Hi @Thuy Le

Sorry if I am misunderstanding your question, but have you used the Variables Window to manage your variables?

https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Variables_Window

avatar
Rising Star

yes, I created variable 109954-1563798273664.png

after now I want to update it with new value, how I can do it?,

avatar
Guru

@Thuy Le

Click on the value you want to change and you should see an edit dialog as follows:

110001-change-value.png

avatar
Rising Star

In this case, you are changing variable manually, my expectation is changing it through any processors (as UpdateAttribute, ExcecuteScript, ... )

avatar
Contributor

How did you resolved this?

avatar
Contributor

You can change the variables with REST API, but I wouldn't suggest this.

1. In this case within NIFI Cluster version numbers could be different between Nodes

2. After variable update a restart is required for controller and processor too (it doesn't matter if you changing it with REST API, or with other methods), you can check the process, when you manually changing it.

 

It's better to create a flowfile with attributes, or write-back data to sources (if it's a database), and compare it from there if possible.

If you have an another solution, please share it :).