Reputation: 179
Recently started working with NiFi and started wondering what are really the differences between those two operators - UpdateAttribute and EvaluateJsonPath? The flows in my project are using both of them to create attributes in Flowfile, and for now I can't really understand what's the difference, as they both seem to be doing more or less the same thing?..
I was reading the docs for them, and saw that:
UpdateAttribute: This processor updates the attributes of a FlowFile using properties or rules that are added by the user. There are three ways to use this processor to add or modify attributes.
EvaluateJsonPath: Evaluates one or more JsonPath expressions against the content of a FlowFile. The results of those expressions are assigned to FlowFile Attributes or are written to the content of the FlowFile itself, depending on configuration of the Processor.
It seems that UpdateAttribute can also take the data from JSON and it is at least more flexible as it can also delete attributes?
Upvotes: 1
Views: 404
Reputation: 98
They are two completely different processors. UpdateAttribute is used to manipulate or create an attribute within the FlowFile, while EvaluateJsonPath is used to extract values from a JSON and insert them either within the FlowFile itself or in its attributes.
Upvotes: 0