You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Grafana-BigQuery dashboard in which I'm using a query as below for time series plots:
SELECT
$__timeGroup(t,$__interval) as time,
${signal_value:csv}
FROM
${dataset}.tbl_${device:csv}_${message:csv}
WHERE
$__timeFilter(t)
GROUP BY
$__timeGroup(t,$__interval)
This works perfectly as long as the $__interval is an integer second value. But when it becomes a millisecond interval, e.g. 500 ms, the query fails with this error message:
error querying the database: googleapi: Error 400: No matching signature for function DIV for argument types: INT64, FLOAT64. Supported signatures: DIV(INT64, INT64); DIV(NUMERIC, NUMERIC); DIV(BIGNUMERIC, BIGNUMERIC) at [2:21], invalidQuery
Is there a way to get around this? Our time series data is often microsecond level in terms of resolution - and we would ideally like to be able to continue to 'zoom in' on the data to the sub second level within Grafana.
See also below video of how the issue materializes:
2024-05-10.09-37-43.mp4
The text was updated successfully, but these errors were encountered:
I fixed this by modifying my query as follows - maybe worth considering updating the macro accordingly:
SELECT
TIMESTAMP_MILLIS(DIV(UNIX_MILLIS(t), $__interval_ms) * $__interval_ms) as time,
${signal_value:csv}
FROM
${dataset}.tbl_${device:csv}_${message:csv}
WHERE
$__timeFilter(t)
GROUP BY
time
I have a Grafana-BigQuery dashboard in which I'm using a query as below for time series plots:
This works perfectly as long as the
$__interval
is an integer second value. But when it becomes a millisecond interval, e.g.500 ms
, the query fails with this error message:Is there a way to get around this? Our time series data is often microsecond level in terms of resolution - and we would ideally like to be able to continue to 'zoom in' on the data to the sub second level within Grafana.
See also below video of how the issue materializes:
2024-05-10.09-37-43.mp4
The text was updated successfully, but these errors were encountered: