Support Questions
Find answers, ask questions, and share your expertise

How to execute a shell script while using NiFi in Windows?

Explorer

I'm using windows NiFi and i need to perform shell action which is installed in same server's VM. Is their any process available to execute the shell script .

Thanks all

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to execute a shell script while using NiFi in Windows?

Contributor

If you are referring to a batch or PowerShell script, this can be accomplished via ExecuteProcess [1] or ExecuteStreamCommand [2]. Both will allow you to execute processes on your host environment and collect its output to stdout from the execution in a resultant FlowFile for further processing. ExecuteStreamCommand additionally allows you to take an incoming FlowFile and pipe its content across stdin to the associated process.

[1] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ExecuteProcess...

[2] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ExecuteStreamC...

View solution in original post

2 REPLIES 2

Re: How to execute a shell script while using NiFi in Windows?

Contributor

If you are referring to a batch or PowerShell script, this can be accomplished via ExecuteProcess [1] or ExecuteStreamCommand [2]. Both will allow you to execute processes on your host environment and collect its output to stdout from the execution in a resultant FlowFile for further processing. ExecuteStreamCommand additionally allows you to take an incoming FlowFile and pipe its content across stdin to the associated process.

[1] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ExecuteProcess...

[2] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ExecuteStreamC...

View solution in original post

Re: How to execute a shell script while using NiFi in Windows?

New Contributor

It will be great if you can help with examples for running powershell scripts.It would be a great help to me