Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 03-12-2022 12:18 PM - edited 03-12-2022 11:23 PM
I have the following json file :
“a”:{
“after”:{
“a123”:{
“ip”:”1.0.0.0”,
“p_id”:”4500”
}
},
“before”:{
“a123”:{
“ip”:”1.0.0.0”,
“p_id”:”4500
}
}
}
I'm trying to create a lookuprecord Processor in NiFi to match with the p_id. If matched then route to something and if unmatched then route to something else. The lookuprecord processor I have is a MongoDBLookUpService.
The user expression I've written for the lookuprecord processor is :
key : /a/after/*['p_id']
Note: [*] because that bit in json keeps changing with every json file.
I've even tried /a/after/*/p_id and nothing seems to work.
They all seem to route to unmatched. Please help me figure out if I'm doing something wrong in the expression.
Created 03-16-2022 10:17 PM
Update : I solved this. I had to use a splitjson before the lookup record processor, then it worked all fine.
Created 03-16-2022 10:17 PM
Update : I solved this. I had to use a splitjson before the lookup record processor, then it worked all fine.
Created 03-17-2022 05:44 AM
@Olivia_4692 I'm happy to see you resolved your issue. Please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.
mark as solution button