Knime Batch mode switch parameters

batch
#1

in this thread Execution of Knime Workflow in Batch Mode
we can see an unbelievable nice script from @ ScottMcLeodPSLGroup

My question is. Did anybody have, or does anybody knows how i can edit parameters to the batch mode?

maybe i want to change somethings in the knime workflow. Like output location or inputfiles etc.

0 Likes

#2

mmhm nobody have ever tried the batch mode ?
:frowning:

Example: I’ve a workflow which imports a csv file and exports a csv file.
In this case i must change the directory of the import file and export file.

how can i do this in batch mode + powershell?

0 Likes

#3

You can pass flow variables when running in batch mode.

See https://www.knime.com/faq#q12

It’s also possible to change the configuration of the workflow through workflow variables. If a variable is defined for a workflow, you can use it in batch mode by referring to it using a comma separated triplet to specify the name, value and type like this:

-workflow.variable=my_integer,5,int

Best,
Philipp

1 Like

#4

well really good; everytime i want to do that, i can only switch GLOBAL WORKFLOW VARIABLES.
Is there no possibility to change variables in the knime.workspace workflow ?

0 Likes

#5

Sorry, I didn’t get this :slight_smile: – what would you like differently?

0 Likes

#6

sry for bad english.
I mean, if i add these arguments for example “-workflow.variable=OUTFILE,“C:\Users\test\file.xlsx”,String’” i 'll create the Global Variable “OUTFILE” to the workflow.
It’s also possible to create variables within the knime.workflow. Is it possible to overwrite these variables within the knimeworkflow?

I think there’s no possibility. Just the way with the global Workflow variables.

0 Likes

#7

I have to admit that it been a while since I did it, but as far as I remember it’s possible to:

  1. Configure the variables for the workflow through the KNIME UI.
  2. Override them through the command line if desired (if not, the default values from (1) are used).

Maybe someone else here can confirm.

Best,
Philipp

0 Likes