Support Questions

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

Can i use ExecuteStreamCommand processor to run a python script on remote machine ?

avatar
Contributor

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 ?

2 REPLIES 2

avatar
Master Guru

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.

avatar
Master Guru

+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.