Support Questions

Find answers, ask questions, and share your expertise

where can i access the "variable registry" in NiFi /Ambari?

avatar

I have heard about variable registry, but I am not sure where to find it or access it. Please can someone help?

2 REPLIES 2

avatar

Hi @bangalore SubbU

in Ambari -> NiFi -> configs -> Advanced nifi-properties, look for the 'nifi.variable.registry.properties' parameter.
nifi.variable.registry.properties can be set to the path of a simple text file (ensure the nifi user has rights to read it), which should be present in that same location on each of the NiFi nodes. After setting this value, each NiFi host needs a restart. The text file you're pointing to should a simple key/value entry for each line - and make sure there are no trailing whitespaces on these lines. For example;

[root@node2 ~]# cat /var/tmp/MyNiFiVariableRegistryFile
somevariable=this-is-a-test
anothervariable=this-is-another-test
TESTPATH=/tmp/archive

avatar
Guru

@bangalore SubbU

You might be interested in the available documentation on using custom properties (https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Using_Custom_Properties) via:

  • Variables window in the NiFi UI (https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Variables_Window)
  • nifi.properties as suggested earlier (https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#custom_properties)

Note that NiFi automatically picks up new or modified variables created in the UI (no restart required).