I have created a group with a couple of variables, each one has a script that does a specific job. ( In this case it uppercases the text )
Each variable holds a Value like this :
The Process inside the Group has the following configurations
I'm making a reference to the PG variable, but i'm unsure about the Script Body, mine is
The code is giving me an error. I'm stuck.
What am I doing wrong.
I don't think this is possible as written, as the PG variables are strings, but even with Jython "eval" it won't have access to the session, flow file(s), etc. Instead you could have a separate ExecuteScript instance for each script, then use routing logic or whatever to send the flow files to the appropriate script(s).
Thank you @Matt Burgess
What and what If I created an Attribute with the value of the PG variable and try to use that value inside a python function.
My function receives a line from a csv ( coming from the flowfile ) and uppercases a specific column.
And I wanted to use the 'myFlowFileAttr' value ( created above ) has the argument 'c' from my function.
But it says "myAttr" is not defined.
Is it possible to do something like this?
TLDR: I want to create an Attribute and use its value with a function with ExecuteScript