Created 06-14-2017 07:42 PM
I am using a ExecuteScript processor to run a python script at a remote machine. This processor doesn't take input from flowfile from an upstream processor, i want to pass the parameter in ExecuteScript processor dynamically.
I saw that ExecuteStreamCommand processor can take parameters from upstream processor. But i am unable to find an option to run the python script on remote machine through this processor. Is there a way to run remote python script through ExecuteStreamCommand processor ?
Created 06-14-2017 09:02 PM
Why not use ExecuteStreamCommand to execute a local shell script that then SSH's to the remote machine and executes the Python script?
For what its worth, ExecuteScript does allow incoming flow files... The script is passed a session object which would then have to use the session to get a flow file, operate on it, and transfer it.
ExecuteProcess doesn't allow incoming flow files so maybe you meant that one? With ExecuteProcess I think you could make the command "ssh" and the arguments be the path to the script on the remote machine.
Created 06-15-2017 03:42 AM
+1 ExecuteScript does allow incoming flow files... also if your scripting language is Groovy you can use Sshoogr to execute remote commands, see my example here.