"Commenting out" parts of the workflow like lines of code in programming languages?


in programming languages, there is usually the prossibility to comment out some parts of the code that will then not be compiled and do not run in the end.

Is something similar possible with nodes in the workflow?

Best regards


You cannot comment out a node on your workflow as in code. However, I would suggest using a Switch statement to control the flow. You can either set a variable to true or false or use some other value in the workflow to skip a node or take a certain path. This may not as efficient if you have many nodes you want to skip at different stages.

Here is a sample on how to use the Switch node. https://www.knime.com/nodeguide/control-structures/switches/using-a-if-switch


If you use the If Switch approach described by @cpadilla then it might be worth taking a look in the Vernalis community contribution, where there are also some if switches (including ones which allow you to set up a direct comparison of a flow variable value, e.g.:


There are variants of the node for normal data tables, flow variable ports, and database connection ports (all the node names end ‘IF Switch (Flow Variable Value)’ if you want to search for them in the node repository.

Some additional thoughts:

  • If you simply want a branch not to run, you could use the if switch approach with the active branch set to be the branch containing the nodes you dont want to run, and nothing attached to the other branch at all
  • If you just want to try something out with the workflow, then you could manually disconnect the connection to the input of the 1st node in the section you want to isolate


Thank you, that solves the Problem :slight_smile:

Yes, usually when I’m trying something out, I just manually disconnect parts of the workflow. But that’s not possible when I execute the workflow on the Knime Server, it seems.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.