Du'oh! Figured it out. Evidently the dot in the name isn't something that a python script likes either. Worked when I removed the "*nifiVar.*". Once again, thanks to Matt Burgess who explained this here for groovy scripts (and apparently for not-so-groovy scripts, like mine):
https://community.cloudera.com/t5/Community-Articles/ExecuteScript-Cookbook-part-3/ta-p/249148 " *Because the property name is bound as-is to a variable name, the naming convention for dynamic properties must be supported for the specified programming language. For example, Groovy does not support period (.) as a valid variable character, so a dynamic property such as "my.value" will cause the processor to fail. A valid alternative in this case is "myValue"*. " On Wed, Dec 8, 2021 at 7:30 AM James McMahon <[email protected]> wrote: > Hello. I am running a nifi1.12 version. I can't seem to access NiFi system > level variables correctly in my python scripts called by ExecuteScript > processors. Can anyone tell me how to correct what I am doing wrong? > > Declare in nifi as a Variable, and known to my process group where I am > referencing it from: > nifiVar.fileGroup ... ABCDEF > > My python script attempts to this, which works for all other attributes > known to my flowFiles: > > result['fileGroup'] = flowFile.getAttribute('nifiVar.fileGroup') > > Thanks for any advice. > Jim >
