Icon

01_​Example_​for_​the_​external_​tool_​(Linux_​or_​Mac_​only)

External Tool Node from Labs

Workflow that shows the execution of an external command. Note that this workflow only works under Linux and MacOS X.

Only runs on linux or mac systems, does not run on windows (fails)! Demonstrates the usage of the "External Tool" node. The workflow indexes the user's home directory (all files) and then calls ascript 'size.sh' on this list. The script generates an intermediate file that contains the size in kB of the individual files. Thisfile is read into KNIME and the size information is joined with the input table.Note: * There are better ways to get size information of the files in a directory. This flow only showcases the use of the external tool node. * The external tool node always joins input data with the output data (based on the row id if the intermediate file format is CSV). This can sometimes be tricky and requires additional steps when setting up the script. * The 'size.sh' is located in the workflow folder. It uses the "drop" functionality to save data with the worklfow. You find the script by browsing to the workflow directory in the subdirectory "Java Edit Variable (#3)/drop" Here is another example: An External tool nodethat uses an inline bash script with while loopsand awk to add all numeric columns and appendthe sum as a new column: Executes the command.Resolves the path to the "size.sh" bash script that is part of this workflow.It uses the actual path to create a command variable such as: <path>/size.sh %inFile% %outFile%Random Datainline scriptcheck OS,i.e. fail on Windows!User's home folder & OSNode 9ExternalTool (Labs) Java EditVariable (simple) Data Generator ExternalTool (Labs) Java EditVariable (simple) Extract SysProperties List Files Only runs on linux or mac systems, does not run on windows (fails)! Demonstrates the usage of the "External Tool" node. The workflow indexes the user's home directory (all files) and then calls ascript 'size.sh' on this list. The script generates an intermediate file that contains the size in kB of the individual files. Thisfile is read into KNIME and the size information is joined with the input table.Note: * There are better ways to get size information of the files in a directory. This flow only showcases the use of the external tool node. * The external tool node always joins input data with the output data (based on the row id if the intermediate file format is CSV). This can sometimes be tricky and requires additional steps when setting up the script. * The 'size.sh' is located in the workflow folder. It uses the "drop" functionality to save data with the worklfow. You find the script by browsing to the workflow directory in the subdirectory "Java Edit Variable (#3)/drop" Here is another example: An External tool nodethat uses an inline bash script with while loopsand awk to add all numeric columns and appendthe sum as a new column: Executes the command.Resolves the path to the "size.sh" bash script that is part of this workflow.It uses the actual path to create a command variable such as: <path>/size.sh %inFile% %outFile%Random Datainline scriptcheck OS,i.e. fail on Windows!User's home folder & OSNode 9ExternalTool (Labs) Java EditVariable (simple) Data Generator ExternalTool (Labs) Java EditVariable (simple) Extract SysProperties List Files

Nodes

Extensions

Links