Issue with toEmpty in String Manipulation node
Hi KNIME Community,
I’ve encountered an issue with the
String Manipulationnode and wanted to share it here to see if anyone else has experienced something similar or has suggestions for a workaround.
In the example workflow at the end of this thread you can see I’m trying to create a new column called “activity” in my table by concatenating several columns (
activity_type,
activity_relation,
activity_value, and
activity_units) using the
joinfunction. Here’s the expression I used:
join(toEmpty($activity_type$), " ", toEmpty($activity_relation$), " ", toEmpty(string($activity_value$)), " ", toEmpty($activity_units$))The problem arises when the
activity_unitscolumn is missing. In such cases, the entire result of the
joinoperation turns out to be null, which isn’t what I expected. I assumed that
toEmptywould convert any missing values into empty strings and that the
joinwould still work with the remaining non-null values.
In fact, when I use the
toEmptyfunction alone in a String Manipulation node on a table with missing values, it doesn’t seem to convert those missing values into empty strings as I expected (see the example workflow). Am I misunderstanding how the
toEmptyfunction is supposed to work, or could there be another reason for this behaviour?
Has anyone faced a similar issue? Any insights into why
toEmptydoesn’t seem to fully handle this situation?
Thanks in advance for your help!
Gio
P.S.: I’m running KNIME AP 5.2.6.