In Knime, how do I Create sequential IDs for rows. I want to use them for assigning primary IDs in a dimension.
Also I want to know, how do I only take a limited number of rows, (like top 5 or bottom 10), and get a random sample
Try adding the Data Generation to your KNIME version.
If it is already installed, search for the node "Counter Generation". It will easily generate sequential IDs. It has 2 parameter. Start From and Interval.
You may want to start from 1 and have step intervals of 1 to generate IDs like 1,2,3,4,5.
As for the Random rows, you can use the node "Row Sampling". It has many parameters, but for what concerns you, you may set it as the following:
Absolute-5 (To get 5 rows) Take from top (To get top 5)
To draw 5 rows randomly from the set, simply select "Draw Randomly".