Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-22 Thread McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
quot;users@nifi.apache.org<mailto:users@nifi.apache.org>" >>mailto:users@nifi.apache.org>> >>Subject: Re: Help on creating that flow that requires processing attributes >>in a flow content but need to preserve the original flow content >> >>One way (in

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread Conrad Crampton
.org>" >mailto:users@nifi.apache.org>> >Subject: Re: Help on creating that flow that requires processing attributes in >a flow content but need to preserve the original flow content > >One way (in NiFi 0.5.0+) is to use the ExecuteScript processor, which gives &g

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
y, March 21, 2016 at 3:17 PM To: "users@nifi.apache.org<mailto:users@nifi.apache.org>" mailto:users@nifi.apache.org>> Subject: Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content Chris,

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread Lee Laim
.apache.org>" < > users@nifi.apache.org<mailto:users@nifi.apache.org>> > Date: Monday, March 21, 2016 at 1:58 PM > To: "users@nifi.apache.org<mailto:users@nifi.apache.org>" < > users@nifi.apache.org<mailto:users@nifi.apache.org>> > Subje

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
t;" mailto:users@nifi.apache.org>> Date: Monday, March 21, 2016 at 1:58 PM To: "users@nifi.apache.org<mailto:users@nifi.apache.org>" mailto:users@nifi.apache.org>> Subject: Re: Help on creating that flow that requires processing attributes in a flow content but need to pr

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread Matt Burgess
One way (in NiFi 0.5.0+) is to use the ExecuteScript processor, which gives you full control over the session and flowfile(s). For example if you had JSON in your "kafka.key" attribute such as "{"data": {"myKey": "myValue"}}" , you could use the following Groovy script to parse out the value of th

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread Joe Witt
Chris - also you were clear. I was just too quick to reply and didn't read carefully. On Mon, Mar 21, 2016 at 1:53 PM, Mark Payne wrote: > Chris, > > Unfortunately, at this time, the EvaluateJsonPath requires that the JSON to > evaluate be the content of the FlowFIle. > There already does exist

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread Mark Payne
Chris, Unfortunately, at this time, the EvaluateJsonPath requires that the JSON to evaluate be the content of the FlowFIle. There already does exist a ticket [1] that would allow you to specify an attribute to use as the JSON instead of requiring that it be the content only. Unfortunately, this

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
Joe, Thanks for the reply. I think I was not clear. The JSON I need to evaluate is in a FlowFile attribute (kafka.key) which I need to be able to evaluate without modifying the original FlowFile content (which was read from the Kafka topic). What I can’t figure out is how to squirrel away th

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread Joe Percivall
Hello Chris, The EvaluateJsonPath processor has the property "Destination" which gives you the option to send it either to the FlowFile content or a FlowFile attribute. Selecting "flowfile-attribute" will place the value in the "kafka.key" attribute of the FlowFile. You can find documentation f

Re: Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread Joe Witt
Chris, Sounds like you have the right flow in mind already. EvaluateJSONPath does not write content. It merely evaluates the given jsonpath expression against the content of the flowfile and if appropriate creates a flowfile attribute of what it finds. For example if you have JSON from Twitter

Help on creating that flow that requires processing attributes in a flow content but need to preserve the original flow content

2016-03-21 Thread McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
What I need to do is read a file from Kafka. The Kafka key contains a JSON string which I need to turn in FlowFile attributes while preserving the original FlowFile content. Obviously I can use EvaluteJsonPath but that necessitates replacing the FlowFile content with the kaka.key attribute, th