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 <[email protected]> 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
