I’m trying to use SQL a bit more, since that seems to be the direction for v3.
In flux I can do this in Grafana:
bucket1heartbeat = from(bucket: “bucket1”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “heartbeat”)
bucket2heartbeat = from(bucket: “bucket2”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “heartbeat”)
How do I achieve this in SQL, where we seem to have to pre-define the bucket in the connector, and then have samples like this:
SELECT
*
FROM
“heartbeat”
WHERE
“time” >= $__timeFrom
AND “time” <= $__timeTo
How do I specify the bucket in SQL so I can query multiple buckets for data.
This doesn’t even seem to be possible in the built in data explorer on the Influx UI.