Empty Table Switch improvement

Hello Knime team,

Recently I have been working on a component dialog, where user may or may not include some column for processing. I tried to use Empty Table Switch node to switch to different scenarios depending on the user’s choice. However I found out that table is not considered empty if it does not contain any columns. Perhaps this node only consider no rows for the table to be empty.

My suggestion is to make a checkbox for the Empty Table Switch node, so it can also consider the table to be empty in case there are columns too.

In the meanwhile I found a solution for my case and it looks ugly to be honest:

1 Like

Hi @Artem,

Thanks for your suggestion.

You are right, the empty table switch only for checking if there are NO rows available. That is also inline with the node description. This boils down to what to consider an empty table …

But for your case you can use the Extract Table Dimension node to get both the number of rows and columns and create a variable out of that. See this example workflow for how this can be done with just two nodes.


1 Like

Hello Temesgen,

Thank you for clarification and suggesting more elegant solution.

But still, it is it possible to add another feature to this node so table with no columns is considered empty?