I’m stuck with the command line syntax with PowerShell under windows 10 with Knime 3.5.2
I’ve defined a small workflow called test1 doing basically almost nothing, simply saving a dummy csv.
Case 1 (success):
With the following call from command line:
knime -nosplash -noexit -consoleLog -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“C:/Users/yap/KNIME/testflows_workspace/from_command_line/test1”
The workflow is called and exectued properly as shown by the screenshot below:
I got an exit code 2, so it’s an issue with the parameters.
In the console log, I got the following message: ERROR main BatchExecutor Unknown option ‘-workflow’
And there, I don’t understand what’s wrong in this command line?
What am I missunderstanding?
That’s weird. I tried with other variables with different types, same thing.
I’ve even replaced the keyword -workflow.variable by -dummy.variable to see what error message I will obtain. And I got the same result, i.e. the ‘dummy’ keyword is unknown (as expected btw).
So it’s the -workflow keyword that is not recognized.
Maybe a knime package is missing in my current installation?
Issue solved. It’s coming from the presence of the . (dot) in the option names… The dot is seen as a separator (or at least a special character) in Windows PowerShell).
I’ve surrounded the option name workflow.variable by double quotes and it works! It’s ugly but solves the issue.
A little update of the documentation might be interesting (if my fix is the proper one).
Another solution could be to add a new keyword workflowVariable doing the same thing than workflows.variable while keeping workflow.variable to ensure that existing command lines continue to run under Ms Dos windows.