Method 1 has computationally expensive “Transpose” nodes, method 2 has “Unpivoting/Pivoting” nodes that are not much better, method 3 has a Column List loop that slow for large tables, and method 4 is probably the fastest but also the ugliest. None of them are pretty.
To summarize, to my knowledge there is no elegant way to perform this relatively simple operation.
I suggest a “Cross Product Math (Multi Column)” (or, more generally, “Cross Operation Math”) node that takes two tables and where mathematical operations can be carried out on the intersection of the Column names (of the numerical columns). The result is a table that has a length of (length of table 1) x (length of table 2).
Thank you for your suggestion @Daniel_Weikert … but can this be easily scaled to 200 columns instead of 2?
As the Column Expressions node takes Javascript code, perhaps it is possible to loop over the columns of the input table and the variables corresponding to the column names, but then each expression can only have one output column… this output column would then need be an array/collection, to be expanded later… and some extra magic would be necessary to assign the correct column names to these expanded columns…