Re: [External] Re: Issue with RouteOnAttribute

2018-10-15 Thread Bryan Bende
w where I’m missing > > > > Regards > > Vyshali > > > > From: Sivaprasanna [mailto:sivaprasanna...@gmail.com] > Sent: Monday, October 15, 2018 6:47 PM > To: users@nifi.apache.org > Subject: [External] Re: Issue with RouteOnAttribute > > > > Adding on, 'Rou

RE: [External] Re: Issue with RouteOnAttribute

2018-10-15 Thread N, Vyshali
the comparison My EL is ${status:contains(${result.status})}. Please let me know where I’m missing Regards Vyshali From: Sivaprasanna [mailto:sivaprasanna...@gmail.com] Sent: Monday, October 15, 2018 6:47 PM To: users@nifi.apache.org Subject: [External] Re: Issue with RouteOnAttribute Adding

Re: Issue with RouteOnAttribute

2018-10-15 Thread Sivaprasanna
Adding on, 'RouteOnAttribute' takes ExpressionLanguage. "*$.result.status*" is not an ExpressionLanguage (EL) but a JSON Path expression. So what you can do is, use EvaluateJsonPath processor to read the value of status using "$.result.status" and assign it to an attribute, say "statusField" (this

Re: Issue with RouteOnAttribute

2018-10-15 Thread Sivaprasanna
Vyshali, UpdateAttribute adds an attribute to the FlowFile i.e. just like filename, filesize, etc., when you set "status" : "OK" using UpdateAttribute, the field doesn't actually get added to the JSON content. I would rather suggest you to use 'UpdateRecord' processor and configure it with JSON

Re: Issue with RouteOnAttribute

2018-10-15 Thread Bryan Bende
Hello, You cannot reference flow file content from expression language, so whatever you want to route on will need to be extracted into a flow file attribute. You can use EvaluateJsonPath with something like status = $.result.status then in RouteOnAttribute ${status:equals('OK')} Thanks,