Nested tables

I know there is a mechanism by which to nest rows. That is, to package up a set of columns into a single ‘tuple valued’ column, such that they can be unpacked later. In effect, a DataCell containing a value of type DataRow.

Is there anything comparable for tables? Is there a way to package up tables to fit inside a single column? In effect, a DataCell containing a value of type DataTable?

If not, any suggestions how to go about it?

Why? This is a Relational Algebra approach to aggregation (grouping and summing).

1 Like

Hi @dandl,

There is currently no native table cell, however you can use the Table to JSON node to create a JSON cell which you can unpack into a table again using the JSON to Table node.

best,
Gabriel

1 Like

Thanks. Yes, I had that in mind if I couldn’t find anything better. JSON does most of what I need, although dates are a bit of a problem.

Can a DataCell/Row/Table be serialised? That was my other thought.

I have been looking at JSON as well, but when I convert a table to JSON Doubles get converted to strings, am I right? Not ideal when I have a lot of Doubles.

I made a post once suggesting a Dictionary/HashMap type for Knime, which could be useful here. https://forum.knime.com/t/feature-suggestion-dictionary-hastable-hashmap-type/17557

1 Like

It’s not just doubles, JSON encodes everything as string, so if that’s a problem for you, keep looking. BJSON is a possibility, but the usual methods for serialisation are probably the best choice.