Potential bug - Unpivot Node - column Selection via Flow Variable

Hi all,

I’m currently working on a MVP to build a Financial Model in KNIME. This includes some interactivity in form of a data app that amongst other things allows the user to tweak aggregation levels of the data that was generated.

This means I’m configuring column selections for pivot / unpivot nodes via flow variables.

I came across the following weird behavior of the unpivot node:

Here is some example Input data:

Previously User Selected “Date” as Dimension so now I need to unpivot this table. This user selection is stored in this flow variable:

In Unpivot Node Flow Variable Config dialogue I have set this variable for included_names in retained_columns:
image

and as the opposite for value_columns
image

If I then inspect the config dialogue the columns seem to be in the right places:

However when executing the node “Date” is visible in the ColumnNames column:

As a comparison this is Unpivot Node with manual selection:

And the table upon execution, which does not have “Date” as value in ColumnNames:

For me this is quite confusion especially as the config dialogue of both version looks the same…

I have produced an example WF that reproduces this behavior (Instead of “Date” Column this works with “Year-Q” Column:

UnpivotPotentialBug.knwf (98.1 KB)

Hello @MartinDDDD,

Thanks for attaching the workflow. I was able to reproduce it and I do see what you are pointing out.

Ticket AP-23423

Thanks for reporting!
TL

5 Likes

Hi @MartinDDDD,

unfortunately you came across old, unexpected behavior of the KNIME AP (internal ticket AP-17639) when selecting columns with array flow variables.

We are currently working on making this behave as expected, meaning, defining either a set of includes or a set of excludes should infer the other domain in column selection. This inference is currently not performed.

Your solution for now is to define both the includes and excludes as flow variables and setting them in the flow variables configuration. This should make the node work the same as configuring columns via the node dialog.

Best, Leon

4 Likes