Limit Rows
Cut a long table down to a set number of rows.
What it does
Limit Rows keeps a set number of rows and removes the rest. You type the number. There is no column to pick. You can sort the table first. Then the rows you keep are the largest or the smallest by that column.
Keep the first rows
- Open the Pipeline panel.
- Type limit in the Search transforms box.
- Select Limit Rows in the results list.
- Type a number in Number of rows. For example, type 100.
- Click Apply.
The grid now shows 100 rows. The step appears in your pipeline. You can edit it or delete it later.
Sort before you cut
Without a sort, Limit Rows keeps the rows in their current order. To change that, use the sort fields:
- Open Sort by (optional). It reads Choose column... until you pick one.
- Pick a column. Each entry shows the column name and its type.
- A Sort direction dropdown appears. It is already set to ASC.
- Keep ASC for smallest first. Select DESC for largest first.
- Click Apply.
Example: you have a table of sales orders. Sort by order_total with DESC. Set Number of rows to 100. You keep your 100 biggest orders.
Tips
- The Sort direction dropdown stays hidden until you pick a sort column.
- The row count must be above zero. Zero or a blank box shows an error.
- Limit Rows never sorts on its own. Pick a sort column when order matters.
- To keep the last rows instead of the first, use Top / Bottom Rows.
For SQL users
The step runs one query. A limit of 100 with a DESC sort runs as:
SELECT * FROM data ORDER BY "order_total" DESC LIMIT 100
Try Limit Rows with sample data →
Related Operations
- Filter - Show only rows matching conditions
- Top / Bottom Rows - Show top or bottom N rows by column value
- Remove Duplicates - Remove duplicate rows