Support Questions
Find answers, ask questions, and share your expertise

Apache NIFI - how I can change value of global variables

Apache NIFI - how I can change value of global variables

Explorer

Hi all,

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


6 REPLIES 6
Highlighted

Re: Apache NIFI - how I can change value of global variables

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

Highlighted

Re: Apache NIFI - how I can change value of global variables

Explorer

yes, I created variable 109954-1563798273664.png

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

Highlighted

Re: Apache NIFI - how I can change value of global variables

Guru

@Thuy Le

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

110001-change-value.png

Highlighted

Re: Apache NIFI - how I can change value of global variables

Explorer

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

Highlighted

Re: Apache NIFI - how I can change value of global variables

Explorer

How did you resolved this?

Highlighted

Re: Apache NIFI - how I can change value of global variables

Explorer

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 :).