hemantvsn
hemantvsn

Reputation: 1446

Apache Nifi Read Configuration properties in processor

Can we read the properties set in nifi.properties in our custom processors? Eg: If we add a custom property nifi.active.profile = dev/qa

and read its value in the custom processor?

Or while starting NIFI pass arguements, which we can later read

Upvotes: 0

Views: 2578

Answers (1)

daggett
daggett

Reputation: 28564

you can use nifi.variable.registry.properties parameter in nifi.properties to define custom properties file(s)

for example:

nifi.variable.registry.properties=./conf/custom.properties

and all properties defined in custom.properties you could access in nifi expression language.

if you have

nifi.active.profile=dev

then you can access it in nifi expression language:

${nifi.active.profile}

returns dev

${nifi.active.profile:toUpper()}

returns DEV

Upvotes: 6

Related Questions