Hello, Welcome to NiFi!
I just tried running an ExecuteStreamCommand processor with the properties you have (I created a script and modified the paths to point to a folder that exists) and two things jump out. One, the Max attribute length must take an integer. If you set it to be a path the processor will be invalid and you'll see a yellow warning icon in the top left of the processor. This means the processor will not run and you'll see the flowfiles queue up in the relationship preceding it. Second, the Output Destination Attribute is only for when you want to output the results of the command to an attribute instead of the content of a new flowfile (useful for running a command to find the character encoding of the contents). Using an integer for the max attribute length I am able to correctly run the script. As a helpful hint, you can see the description of a property by hovering over the light blue "?" icon in the configure processor tab. Also you can see the documentation for the processor by right clicking on it and selecting "usage" from the list. Also what will you eventually be doing with your script? The way the ExecuteStreamCommand is designed to work is by taking in a FlowFile and then running an external command on it. So you may make your flow more efficient and user friendly by putting the ExecuteStreamCommand between the Get and Put. Hope that helps, Joe - - - - - - Joseph Percivall linkedin.com/in/Percivall e: [email protected] On Sunday, February 28, 2016 4:53 PM, jose antonio rodriguez diaz <[email protected]> wrote: Hello All, I am just getting started with apache Nifi doing a kind of PoC (Proof of Concept) My DataFlow is compose as follow GetFile->PutFile->ExecuteStreamCommand The idea is move a file from a folder to another one and then execute an script. The first step (move the file from one side to the other) works perfectly but I haven´t been able to execute the script. The script is very simple I just want to create a file on my desktop. the script called script.sh is located on my Desktop ($HOME/Desktop/script.sh) #!/bin/bash echo "This is a test" >> /Users/joseantoniorodriguez/Desktop/foo.txt Also the ExecuteStreamCommand is configured as follow Command Path: /Users/joseantoniorodriguez/Desktop/script.sh Ignore STDIN: true Working directory: /Users/joseantoniorodriguez/Desktop Argument delimiter: ; Output destination attribute: /Users/joseantoniorodriguez/Desktop —> ¿Is this necessary? Max attribute length: /Users/joseantoniorodriguez/Desktop The file I’m using to test are both csv about one of 324KB and the other 22MB. After execute I could see the file has been moved from one folder to the other but I did´t see any foo.txt file on my desktop, also I did´t see any error on the Flow. Could anybody give me a hand with this I am pretty sure this should be a ridiculous error or misconfiguration. BY the way the OS is Mac OS X. Thanks in advance.
