limit() function
The limit()
function limits each output table to the first n
records.
The function produces one output table for each input table.
Each output table contains the first n
records after the offset
.
If the input table has less than offset + n
records, limit()
outputs all records after the offset
.
Function type: Filter
limit(
n:10,
offset: 0
)
Parameters
n
The maximum number of records to output.
Data type: Integer
offset
The number of records to skip per table before limiting to n
.
Defaults to 0
.
Data type: Integer
Examples
Output the first ten records in each table
from(bucket:"example-bucket")
|> range(start:-1h)
|> limit(n:10)
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, the following resources are available:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.