Skip to main content
Keeps only the first N or last N records from the dataset. Use it after sorting to get “top N” results, or to limit the size of data flowing downstream.

Configuration

How It Works

1

Set the limit

Enter the number of records to keep.
2

Choose mode

Select Head for the first N records or Tail for the last N.

Output

The first or last N records from the input. If the dataset has fewer records than the specified value, all records are kept.

Example

Get the top 10 accounts by revenue:
  1. Sort → Revenue (descending)
  2. Head/Tail → Value: 10, Mode: Head
Result: only the 10 highest-revenue accounts flow downstream.

Best Practices

  • Always Sort before Head/Tail if the order matters - without sorting, Head/Tail returns arbitrary records
  • Use Head to sample data during testing (e.g., limit to 5 records before an AI Enrichment node)
  • Use Tail to get the most recent records when data is sorted by date
  • Sort - order records before limiting with Head/Tail
  • Simple Filter - filter by conditions rather than position