Tuesday, March 14, 2017

NiFi ExecuteScript Cookbook

Hello All!  Just wanted to write a quick post here to let you know about a series of articles I have written about ExecuteScript support for Apache NiFi, with discussions of how to do various tasks, and examples in various supported scripting languages. I posted them on Hortonworks Community Connection (HCC).  Full disclosure: I am a Hortonworks employee :)


  1. part 3 link ... goes to part 2 again.

    1. Weird redirect :-/ Good catch, thanks! I've updated the link.

  2. Hi Matt

    I scrape a facebook page using python; say 2000 posts from the page and want to use executeScript processor to get all the posts once read by python script and pass them to solr nifi processor.

    Since executeScript is my start point of the flow so I will create a flow file however what is not clear to me is how to write to the flowfile. ? My output from python script is in csv format.

    Your help is highly appreciated.


    1. Worth mentioning that your blogs and cookbook is of great help. Excellent read. Cheers

  3. ExecuteScript or InvokeScriptedProcessor?
    I read messages from AMQ. I can get to the message body quite easily, and there is also AttributesToJSON which exposes the attributes.
    Nevertheless I think I'll need to scrip something to be able to "promote" an attribute into become a "field" in the body.
    In other words: I need to add a field to the JSON (body) whose value is the value from an Attribute of the FlowFile.

    How would you go about this?

  4. Would you have an example as to how to pass the input parameters to the executescript python script(syz.py) and create a flowfile with the output of the python script?

  5. Hi All,

    We have a issue that

    We need to run shell script which requires the incoming flow files (2 flow files) ,Can someone suggest how to pass those flow files to the script.