How to read the values of attributes in Apache NiFi

11.4k Views Asked by At

I'm working on a sample NiFi flow where I get a Json file as input. I use EvaluateJsonPath processor to get the value of the desired path. I've set the destination of EvaluateJsonPath as "flow-file attribute" and I added new properties with the required JsonPath. For ex: Property name: username, value: $.input.username. Now, I will be needing this value in the next processor. So I want to know which processor should I use to read the attributes of the flow-file.

1

There are 1 best solutions below

0
On BEST ANSWER

You don't need a special processor to read the attributes of a FlowFile.

If this is your attribute key/value pair.

username : $.input.username

You can read that value like below in any processor property that supports Expression Language.

${username}