Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Is it possible to reference parameters within the ExecuteScript processor?

avatar
Frequent Visitor

Is it possible to reference parameters within the ExecuteScript processor? My current solution is to create an attribute which contains the parameter value, but it would be a much cleaner solution to be able to directly reference the parameter from the parameter context in my script. For reference, I am using Python.

2 REPLIES 2

avatar
Super Collaborator

avatar

@Carson,


Like @joseomjr wrote (but did not gave the entire link by mistake), you should take a look at the following Article as it describes exactly what you need -->  https://community.cloudera.com/t5/Community-Articles/ExecuteScript-Cookbook-part-3/ta-p/249148

 

Basically, you add the property in your NiFi Processor and reference it to your parameter value and afterwards you call it in your script:

myValue1 = myProperty1.getValue()