← All nodes
Transformations

Rownum

Adds a SQL ROW_NUMBER() counter: every row gets its own number, with no ties, restarting for each partition.

When to use it

Use it to number rows for a report, to pick the newest record per customer, or to give a batch of rows a simple position.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
New Column NametextYesRow Number
Insert Afterselect—End of table
Partition Byselect—Whole table (no partition)
Order Byselect—Order rows arrive in
Order Directionselect—asc
Start Fromnumber—1

Example

Newest order first, per customer

  • New Column Name=Order No
  • Partition By=Customer
  • Order By=Order Date
  • Order Direction=Descending
Incoming rows
CustomerOrder DateTotal
Acme2026-02-01120
Acme2026-05-0980
Harbour2026-03-14300
1 is the newest order for each customer
CustomerOrder DateTotalOrder No
Acme2026-02-011202
Acme2026-05-09801
Harbour2026-03-143001

Keep only the newest per customer by following this node with Filter Rows on Order No equals 1.

Worth knowing

  • Unlike Rank, equal rows still get different numbers; the order between them stays the same on every run.
  • Start From numbers the rows from something other than 1.
  • Leave Partition By empty to number the whole table straight through.

Others in Transformations