I'm trying to query my InfluxDB (1.8) using Flux and retrieve only 100 series, at first I thought the "limit" function will do it, however, I found out it only limits the number of records in each table (series) which can result in max(100) * N(series). then I tried a workaround:
from(bucket: "bucket")
|> range(start:1970-01-01T00:00:00Z)
|> filter(fn: (r) => (r["_measurement"] == "measurement" ))
|> group()
|> limit(n:100)
|> group(columns:["column1","column2"])
by doing so, I'm able to group all results into a single table and limit the results, however, it's not even close to what I need. I'm retrieving only 100 points and also losing the ability to regroup by columns. I know that by using InfluxQL "SLIMIT" function, it can be done.
Any thoughts about how I can achieve that using flux query language? Thanks!