limit() function

The limit() function limits the number of records in output tables to a fixed number (n). One output table is produced for each input table. The output table contains the first n records from the input table. If the input table has less than n records, all records are be output.

Function type: Filter
Output data type: Object

limit(n:10)

Parameters

n

The maximum number of records to output.

Data type: Integer

Examples

from(bucket:"telegraf/autogen")
  |> range(start:-1h)
  |> limit(n:10)

LIMIT

This documentation is open source. See a typo? Please, open an issue.


Need help getting up and running? Get Support