Skip to main content

Limit

Limits the number of records passed to the next stage in the pipeline.

Limit takes a positive integer that specifies the maximum number of records to pass along.

10 // return the top 10 records (see warning about ordering)
Warning about ordering

Records aren't guaranteed to return in any particular or consistent ordering unless:

  • a Sort stage exists earlier in the pipeline.
  • That sort stage sorts on a field or fields with unique values.