1.2 KiB
1.2 KiB
title | description | aliases | menu | weight | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
limit() function | The `limit()` function limits the number of records in output tables to a fixed number (n). |
|
|
401 |
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.
Each output table contains the first n
records after the first offset
records of the input table.
If the input table has less than offset + n
records, all records except the first offset
ones are output.
Function type: Filter
Output data type: Object
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
from(bucket:"example-bucket")
|> range(start:-1h)
|> limit(n:10, offset: 1)