I would like to use the External Tool node (on KNIME 4.0, i.e. not the labs version) to launch
a bash script with three command line arguments:
bash myscript.sh MYARG1 INFILE OUTFILE
How should I refer to the input and output files with the command line arguments? Unfortunately the node documentation is not too helpful here.
I played around a bit and came up with an example workflow which shows how to increment a table by 1. You have to update the paths to match your file system in the External Tool Node (Unfortunately it does not seem to support the knime protocol). See https://hub.knime.com/johannes.schweig/space/external-tool-basic-example
Let me know if that solved your problem.
thanks for the example. Could you please include the script.sh file into the
example? To me it is not clear how the input and output file locations are
I used a small trick to include it in the workflow itself. If you import the workflow to your knime-workspace (or extract the .knwf file), there should be some folders and files as below. Go into the test folder, there is a script called
I see, you have hardcoded the file names into the shell script.
Meanwhile, I found another solution where I explicitly add the absolute
paths to the input and output files into the “Commandline Arguments” field
of the node dialog,
Thank you for your help, the node works now!