Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to Execute an external binary file and pass the flowFiles as arguments of the binary File

Solved Go to solution

How to Execute an external binary file and pass the flowFiles as arguments of the binary File

Hello All,

I have a project that collect files in a directory and i create i binary that transform the file passed in argument

ex : ./myBinary <theFile> if execute it in as a shell command ....

but i want to integrate it in the nifi and do automaticaly the transformation for every files that arrives in the directory.

Thanks for advance for your answers.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to Execute an external binary file and pass the flowFiles as arguments of the binary File

You could setup ListFile processor to periodically monitor the directory, and send the listings to an ExecuteCommand processor.

The command to execute would be ./yourBinary ${path}/${filename}"

The path and filename variables come from the flow files produced by ListFile.

View solution in original post

2 REPLIES 2
Highlighted

Re: How to Execute an external binary file and pass the flowFiles as arguments of the binary File

You could setup ListFile processor to periodically monitor the directory, and send the listings to an ExecuteCommand processor.

The command to execute would be ./yourBinary ${path}/${filename}"

The path and filename variables come from the flow files produced by ListFile.

View solution in original post

Highlighted

Re: How to Execute an external binary file and pass the flowFiles as arguments of the binary File

thank you very much , it is very helpful

Don't have an account?
Coming from Hortonworks? Activate your account here