Skip to main content
murali2425
Gold ⭐️
January 9, 2020
Solved

Facing problem while extracting the data from json flow file using EvaluateJsonPath in NiFi

Hi,

I am receiving the flowfile from ConsumerKafka in json form.

 

ConsumerJson.PNG

 

Then I am using EvaluateJsonPath to extract the json data once the data matched, i want call RouteOnAttribute to call script, but the expression which i have used  in EvaluateJsonPath   processor looks to be wrong and throwing out unmatched info.

EvaluateJsonParser.PNG

Plz help me out to add right expression to extract  the fields

 

stevenmatison
Platinum ⭐️⭐️
January 9, 2020

Based on your content, the values are accessed as follows:

 

$.HR.finance.name

$.HR.finance.age

7 replies

stevenmatison
Platinum ⭐️⭐️
January 9, 2020

Based on your content, the values are accessed as follows:

 

$.HR.finance.name

$.HR.finance.age

Translate
murali2425
Gold ⭐️
January 9, 2020

ohh my BAD, thank you Steven.

Translate
murali2425
Gold ⭐️
January 9, 2020

Hi Steven,

I doing a poc(learning nifi and doing it),  getting the data successfully from EvaluteJasonPath its going to matched processor with the only extracted data, but the flow file is missing when it is going to RouteOnAttribute, I could see only data extracted present but total flow file is missing, because of this my condition is not getting validated and going to unmatched status.

RouteOnAttribute.PNG

 

 

 

Translate