I'm using this query to fetch all the available tag values from the measurement:
schema.measurementTagValues(
bucket: "XYZ",
measurement: "ABC",
tag: "test",
)
This results in me all the tagValue in measurement ABC.
How can I use these tagValue to fetch the last field per tag from the same or a different measurement?
Here is what I tried:
import "influxdata/influxdb/schema"
data = schema.measurementTagValues(
bucket: "XYZ",
measurement: "ABC",
tag: "test",
)
from(bucket: "XYZ")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "ABC" or r["test"] == data)
|> last()
This throws unsupported binary expression string == stream
error.
Any other ways to get it working?