This looks very promising Koji. I will try this first thing in the morning.
Thank you very much for your help! This looks like it will do the trick.

On Sun, Jan 15, 2017 at 7:36 PM, Koji Kawamura <ijokaruma...@gmail.com>
wrote:

> Hello James,
>
> It seems that you need to pass an instance of a class extending
> InputStreamCallback.
> Here is an example that I derived from NiFi test case:
> https://gist.github.com/ijokarumawak/1df6d34cd1b2861eb6b7432ee7245ccd
>
> Hope this helps.
>
> Thanks!
> Koji
>
> On Mon, Jan 16, 2017 at 9:02 AM, James McMahon <jsmcmah...@gmail.com>
> wrote:
> > Good evening. I often create a custom flowfile payload using a Python
> Stream
> > Callback. I define a Python dictionary using
> > result = {}
> > and I selectively build my payload as a JSON object, populating it with
> > flowfile metadata attributes, like so
> > result['comment'] = flowfile.getAttribute('message.COMMENTS')
> > .
> > .
> > .
> > outputStream.write(unicode(json.dumps(result))
> >
> > My question is this: how do I also select the data payload of the
> original;
> > flowfile for inclusion in my output result? What would I use in place of
> > flowfile.getAttribute() to snag the data and include that in my json
> object
> > ?
> > Thanks you very much in advance for your assistance. -Jim
>

Reply via email to