Given a table with three columns with time series data, the following behavior has been observed with Grafana 9.4.7 with michelin-snowflake-connector 1.4.1
+-----------------------+------------------+--------------------+
| Timestamp | Node | Measurement |
+-----------------------+------------------+--------------------+
| 2023-05-17 00:00:00 | node A | 234 |
+-----------------------+------------------+--------------------+
| 2023-05-17 00:00:00 | node B | 263 |
+-----------------------+------------------+--------------------+
| 2023-05-17 00:00:00 | node C | 213 |
+-----------------------+------------------+--------------------+
| 2023-05-17 00:05:00 | node A | 212 |
+-----------------------+------------------+--------------------+
| 2023-05-17 00:05:00 | node B | 297 |
+-----------------------+------------------+--------------------+
| 2023-05-17 00:05:00 | node C | 243 |
+-----------------------+------------------+--------------------+
This results in 2 rows after the grafana timeseries transform:
+-----------------------+------------------+-------------------+---------------+
| Timestamp | node A | node B | node C |
+-----------------------+------------------+-------------------+---------------+
| 2023-05-17 00:00:00 | 234 | 263 | 213 |
+-----------------------+------------------+-------------------+---------------+
| 2023-05-17 00:05:00 | 212 | 297 | 243 |
+-----------------------+------------------+-------------------+---------------+
We are expecting 6 rows, but for the sake of example, if MaxDataPoints were set explicity to 4 (or implictly by panel width and timerange)
the plugin adds “LIMIT 4” to the query and only fetches 4 rows, which results in missing samples:
Grafana version: 9.4.7 Plugin Version: 1.4.1
currently we are limiting query size if the query is time series and maxDataPoints is set
https://github.com/michelin/snowflake-grafana-datasource/blob/master/pkg/query.go#LL218C5-L218C34
Below is the problem with an example data:
Given a table with three columns with time series data, the following behavior has been observed with Grafana 9.4.7 with michelin-snowflake-connector 1.4.1 +-----------------------+------------------+--------------------+ | Timestamp | Node | Measurement | +-----------------------+------------------+--------------------+ | 2023-05-17 00:00:00 | node A | 234 | +-----------------------+------------------+--------------------+ | 2023-05-17 00:00:00 | node B | 263 | +-----------------------+------------------+--------------------+ | 2023-05-17 00:00:00 | node C | 213 | +-----------------------+------------------+--------------------+ | 2023-05-17 00:05:00 | node A | 212 | +-----------------------+------------------+--------------------+ | 2023-05-17 00:05:00 | node B | 297 | +-----------------------+------------------+--------------------+ | 2023-05-17 00:05:00 | node C | 243 | +-----------------------+------------------+--------------------+
This results in 2 rows after the grafana timeseries transform: +-----------------------+------------------+-------------------+---------------+ | Timestamp | node A | node B | node C | +-----------------------+------------------+-------------------+---------------+ | 2023-05-17 00:00:00 | 234 | 263 | 213 | +-----------------------+------------------+-------------------+---------------+ | 2023-05-17 00:05:00 | 212 | 297 | 243 | +-----------------------+------------------+-------------------+---------------+
We are expecting 6 rows, but for the sake of example, if MaxDataPoints were set explicity to 4 (or implictly by panel width and timerange) the plugin adds “LIMIT 4” to the query and only fetches 4 rows, which results in missing samples:
+-----------------------+------------------+-------------------+---------------+ | Timestamp | node A | node B | node C | +-----------------------+------------------+-------------------+---------------+ | 2023-05-17 00:00:00 | 234 | 263 | 213 | +-----------------------+------------------+-------------------+---------------+ | 2023-05-17 00:05:00 | 212 | | | +-----------------------+------------------+-------------------+---------------+