Row order

I have a table that has the Row ID "Row1", "Row2" etc.  After manipulating my data the Row ID is not sequential.  If I use the sorter node to sort by Row ID I get the unwanted result "Row1", "Row10", "Row 11".  Is there anyway to around this?

See this post here;

http://tech.knime.org/forum/knime-general/sorting-on-rowid

 

A workaround is to use the Maths Formula node before manipulating data to add a column with sequential numbers in, so in Maths node, use RowIndex.

Then after manipulation use Sorter node on this new column. Rather cumbersome, but the only solution so far...

Simon.

The RowID node was made for this. Check the top checkbox and it'll generate new RowID's.

Thanks, I did something similar using a java snippet to pull out the RowID and replace the "Row" with "" and then string to number, rejoined to original table and sorted numerically.  Maybe KNIME could implement the option in the RowID node to create a pure numerical list of row IDs in future.

nbrooijmans, I think you misunderstand. Using the RowID to regenerate new RowIDs will not allow you to get back the original row order of the table.

Simon.

I've surfaced this again in our issue tracking system. 

Aaron

See also http://tech.knime.org/forum/knime-general/sorting-on-rowid for a continued discussion.

Hey all,

good things come to those who wait: on behalf of our developers (praise goes to @hotzm !), I’m happy to announce that a alphanumeric sort order has been implemented in the sorter node, the table view, and most other places where sorting is done. Check it out in the new KNIME Version 4.7.1! (of course, backward compatibility is not broken, so e.g. the GroupBy/Pivot Nodes still sort strings the old fashioned way. Also, this was already available in 4.7.0 in case you didn’t notice :slight_smile: )

Kind regards,
Lukas

1 Like