Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Is it possible to reference parameters within the ExecuteScript processor?

avatar
New Contributor

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()