Column sorting

Hello,

I am facing to an issue regarding column sorting.

I want to sort the column according to their header (names), for example A to Z.

To do so, the "Column resorter" node is perfect.

The problem is that, in my workflow and depending to input, the column might have different names, and the sorting can not occur properly with this node as it has to be done manualy by chosing the sorting method (A-Z). I need my workflow to be 100% autonomous, and thus, I wish that this sorting could be done without any external intervention.

Is there any alternative way to sort column automatically ?

Thanks

Deuterium

I agree an additional node to do this in an automated way would be ideal.

it can still be done, but takes more nodes.

Use the transpose node.

then use sorter node on rowid column.

then transpose node again.

 

simon.

Thanks for this suggestion Simon.

This works but ask more nodes indeed.

Regards

Deuterium

Hello all,

Yes, I am facing the same problem but the thing is that I have hundred thousand rows and thousand columns: i.e. a double transposition in KNIME is crazy. Is there another way to get this done automatically?

"Extract Table Spec" to get the columns' names as rows, "Sorter" to sort them, "Reference Column Resorter" to apply the sorting? This avoids transposing.

6 Likes