You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Carson Goff <Ca...@octo.us> on 2023/01/27 13:46:57 UTC
Reference parameters within execute script processor?
Hello,
I have been doing some research lately and have not been able to find anything regarding this. I would like to be able to reference some of my parameters within an execute script processor running a python script, is this currently possible within nifi? If not, is it a planned feature?
Thanks,
Carson Goff
Octo | Data Engineer
M: 410-991-1870
Re: Reference parameters within execute script processor?
Posted by Kevin Doran <kd...@apache.org>.
Hi Carson,
Yes, it is possible. You want to add dynamic (user-defined) properties in
the processor config that reference your parameters.
For ExecuteScript [1] these will be passed to your python script as
variables with the same name.
For ExecuteStreamCommand [2] these will be passed to your python script as
environment variables with the same name.
Apache NiFi recently added the ability to reference Sensitive Parameters
from dynamic properties, so even those can be passed to scripts using this
method.
[1]
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-scripting-nar/1.19.1/org.apache.nifi.processors.script.ExecuteScript/additionalDetails.html
[2]
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.19.1/org.apache.nifi.processors.standard.ExecuteStreamCommand/index.html
Hope this helps!
Kevin
On Jan 27, 2023 at 08:46:57, Carson Goff <Ca...@octo.us> wrote:
> Hello,
>
> I have been doing some research lately and have not been able to find
> anything regarding this. I would like to be able to reference some of my
> parameters within an execute script processor running a python script, is
> this currently possible within nifi? If not, is it a planned feature?
>
> Thanks,
>
> Carson Goff
> Octo | Data Engineer
> M: 410-991-1870
>
>