Using InfluxDB 2.1.1 on Linux
I’m trying to extract values from a column into an array which I can use in a contains() function but I keep tripping on something. For some reason it only matches rows with what I assume is the last value in the array
Here’s what I’ve done
mySeries1 has a tag called ‘id’ containing a number as string
mySeries2 has an equivalent tag
// this returns 12 entries
myList = from(bucket: "myBucket")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "mySeries1")
|> group(columns: ["id"])
|> last()
|> group(columns: ["_measurement"])
|> findColumn(fn: (key) => true, column: "id")
// here I only get rows with the last id in the list above
from(bucket: "myBucket")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "mySeries2")
|> filter(fn: (r) => contains(value: r.id, set: myList ))
What am I doing wrong here?