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 you can use EvaluateJsonPath
and add a property with a name
'twitter.user' and a value of '$.user.name'

Once you run the tweets through each flow file will have an attribute
called 'twitter.user' with the name found in the message.  No
manipulation of content at all.  Just promotes things it finds to flow
file attributes.

Thanks
Joe

On Mon, Mar 21, 2016 at 1:34 PM, McDermott, Chris Kevin (MSDU -
STaTS/StorefrontRemote) <[email protected]> wrote:
> 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, thus 
> loosing the original FlowFile content.  I feel like I’m missing something 
> fundamental.
  • Help on creating th... McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
    • Re: Help on cr... Joe Witt
      • Re: Help o... McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
        • Re: He... Mark Payne
        • Re: He... Matt Burgess
          • Re... McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
            • ... Lee Laim
              • ... McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
            • ... Conrad Crampton
              • ... McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote)
    • Re: Help on cr... Joe Percivall

Reply via email to