I would like to reference an environment variable (a linux environment variable) in my Nifi Processors. I tried using expression language by referencing ${MY_VARIABLE_NAME}
directly in the properties of the processor. But this doesn't seem to work. Is this even possible ? If yes How can it be done ?
Thank you for your suggestions.
You can reference environment variables in NiFi Expression Language as you describe. If it is not working, you might check a few things:
${USER}
or ${PATH}
for contrast)This is briefly discussed in Structure of a NiFi Expression in the NiFi Expression Language Guide with respect to escaping:
For example, the following can be used to escape an attribute named “my attribute”:
${"my attribute"}
or${'my attribute'}
.In this example, the value to be returned is the value of the "my attribute" value, if it exists. If that attribute does not exist, the Expression Language will then look for a System Environment Variable named "my attribute." If unable to find this, it will look for a JVM System Property named "my attribute." Finally, if none of these exists, the Expression Language will return a null value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With