'Can we modify timestamp in time picker in grafana?
I am using Druid as datasource for my grafana. I want to ignore the first and last data points from the druid query result(like trimming the edges). I am thinking of modifying the timestamp passed to druid query from the timepicker. But I cannot find a way to modify the timestamp choosen from the timepicker in grafana. Is there any other way to ignore the first and last data points? Sample query sent by grafana
"__time" >= TIME_PARSE('2022-02-13T07:32:46.055Z') AND "__time" <= TIME_PARSE('2022-02-13T10:32:46.055Z')
Solution 1:[1]
In SQL you can use OFFSET 1 to skip the first row of the result, so this should allow you to remove the first data point. Unfortunately, that only solved half of your question.
You can use LIMIT N so that only N rows are returned. In principle, if you know how many rows are in the result, you could use OFFSET 1 LIMIT <rowcount> - 2 to achieve what you want as long as rowcount > 2. But unless you have a fixed set of values per timeframe, it will likely prove hard to get that .
https://druid.apache.org/docs/latest/querying/sql.html#limit
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sergio Ferragut |
