Dear Knimers,
In my workflow I make extensive use of the List type to efficiently store large chunks of numbers. But I have been thinking that it would be awesome to also have in Knime something like a Dictionary (Python) or Hashtable/HashMap (Java).
It could work as follows. Suppose I have some columns and I want to combine them using the Column Aggregator node. By combining them into a Dictionary, the values in the columns could be combined with the column headers as keys. Calling Split Collection Column on the Dictionary, the keys could become column headers again. Similarly, by combining the values in a single column into a Dictionary using the GroupBy node, the keys could be the row IDs.
Simultaneously ungrouping multiple dictionaries in neighboring columns could work like a “join” on the dictionaries; knime could automatically make sure that the keys line up and that empty values are created when a key is present in one dictionary but not the other. This would be much safer than simultaneously ungrouping two neighboring lists and pray that I did not accidentally mess up up the ordering along the way.
Best,
Aswin