knime work-flow in Excutable

Hi

Could any one write me how to implement KNIME work-flow in excutable mode. There is limited information is provided in FAQ. It woulpd be nice if some one tell me how to submit the jobs and get the result and some useful comments

Best regards

Nathan

Export the workflow as archive and run it on command line using the so called batch mode; if you don't enter the KNIME-specific arguments, you will get the full command line help.

1 Like

HI

Actually i dont know how to run the commend

i have exported the work-flow into zip file (dataset_model.zip), where should i run the following commend ? from working directory or knime directory ?

knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION

this gives only few commends

I have also tried ./knime dataset_model.zip org.knime.product.KNIME_BATCH_APPLICATION

but i doesnt help

nathan

 

You have to run this command inside you KNIME installation; basically where you find the KNIME executable writing as (Linux):

knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION
-workflowDir="workspace/<your_workflow>"

1 Like

:~/knime/knime_2.3.4$ ./knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION

Usage: The following options are available:
 -nosave => do not save the workflow after execution has finished
 -reset => reset workflow prior to execution
 -credential=name[;login[;password]] => for each credential enter credential
                 name and optional login/password, otherwise its prompted for
 -masterkey[=...] => prompt for master passwort (used in e.g. database nodes),
                 if provided with argument, use argument instead of prompting
 -preferences=... => path to the file containing eclipse/knime preferences,
 -workflowFile=... => ZIP file with a ready-to-execute workflow in the root
                  of the ZIP
 -workflowDir=... => directory with a ready-to-execute workflow
 -destFile=... => ZIP file where the executed workflow should be written to
                  if omitted the workflow is only saved in place
 -destDir=... => directory where the executed workflow is saved to
                  if omitted the workflow is only saved in place
 -workflow.variable=name,value,type => define or overwrite workflow variable
                  'name' with value 'value' (possibly enclosed by quotes). The
                  'type' must be one of "String", "int" or "double".
 -option=nodeID,name,value,type => set the option with name 'name' of the node
                  with ID 'nodeID' to the given 'value', which has type 'type'.
                  'type' can be any of the primitive Java types, "String"
                  or any of "StringCell", "DoubleCell" or "IntCell".
                  If 'name' addresses a nested element (for instance
                  "rowFilter" -> "ColValRowFilterUpperBound"), the entire
                  path must be given, separated by "/".
                  If the node is part of a meta node, provide also the node
                  ids of the parent node(s), e.g. 90/56.

Some KNIME settings can also be adjusted by Java properties;
they need to be provided as last option in the command line:
 -vmargs -Dorg.knime.core.maxThreads=n => sets the maximum
                  number of threads used by KNIME

this is the message i get when i type the above mentioned commend. What is next step ? I have no idea what i am trying, Could you please write in detail step by step..

Best regards

Nathan

Good. If you have you zipped workflow, you just add the option '-workflowFile=<...>' to the end of the command and execute it. That's it. Just to make sure we talk about the same thing, the batch mode only allows executing workflows from command line without launching the KNIME.

Hi

thanks, it works now. I have another doubt!

is it possible to excute only one input path(file reader). I have model with traning and test set, that means two file reader. But once the model is finaliazed, it should excute only test set input everytime and predicted based on the already avaliable training set. Because training set is quite big file, if this file excutes every time it may takes bit longer time. 

can we specify only testset path should be excuted ?

best regards

Nathan

Nodes that are executed when you save the workflows within the KNIME GUI are not re-executed if you run the workflow with the Batch Executor. All other non-executed nodes are run, though, there is not way to executed only selected nodes.

1 Like

Hi

thanks for your reply

best regards

Nathan

Hello,

I am having difficulty getting a workflow file to execute from the windows command line.

I have my workflow saved as a zip file, in the directory c:/programs. but I can't seem to get the syntax right or som other error is keeping me from executing it.

Running from KNIME instalation foler:

'knime -consoleLog -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="C:/programs" -workflowFile="KNIME_project4"'

I get the error " Workflow file 'Knime_Project4' is not a file." in the Knime Consol

+then the Java exit code=2

Tips? All help greatly appriciated

Thanks

DC

You must either use workflowDir (for unpacked workflow) or workflowFile (for zipped workflows) but not both at the same time. In your case you need to specify the full path to the zipped workflow via workflowFile.

That works, Thanks!

 

Hi Even am getting the same error i tried using -workflowFile=“C:\Knime\latest-knime\workflow.zip”

Please help us solving if any one has fixed such issues.

Hi,

Can you help me solving this if you have already fixed it.

In the interest of keeping the forum tidy, I’m locking this (very old) thread since you have already started a separate thread about the same issue.

2 Likes