Transformations
Repeat Rows
Duplicates each row a fixed number of times, or as many times as a column says.
When to use it
Use it to expand quantities into individual lines, for example one label, serial number or shipping line per unit ordered.
In a pipeline
File InputRepeat RowsExport CSV
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Repeat Count | number | — | 1 |
| Count Column (overrides fixed count) | select | — | — |
| Row Limit | number | — | 1000000 |
Example
One line per unit ordered
- Count Column (overrides fixed count)=Qty
| SKU | Qty |
|---|---|
| A-1 | 2 |
| B-2 | 1 |
| SKU | Qty |
|---|---|
| A-1 | 2 |
| A-1 | 2 |
| B-2 | 1 |
Copies are identical, including the Qty column itself; add a Sequence node afterwards if each copy needs its own number.
Worth knowing
- When a count column is set it wins over the fixed count, and it is read per row.
- A count of 0, blank or non-numeric drops that row, which makes it a quick way to remove zero-quantity lines.
- The fixed count is used only when no count column is chosen.
- Row Limit is the ceiling on what this node may produce, 1,000,000 by default. Repeating rows multiplies them, so a large count can ask for billions of rows; the node works the total out first and stops with a message instead of running the server out of memory. Raise it for a load that genuinely needs more.