Quantcast
Channel: InfluxDB - Grafana Labs Community Forums
Viewing all articles
Browse latest Browse all 199

Flux query syntax help

$
0
0

Hi,

I use graphana to querry some influxDb value.

I have temperature, Humidity, timestamp, ID and EUI

If I make a querry without EUI or ID, all work well

On my querry I would like to have only the value with ID 1

I make this querry and it return 0 row

from(bucket: "borealis")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "borealis")
  |> filter(fn: (r) => r["_field"] == "TEMPERATURE")
  |> filter(fn: (r) => r["_field"] == "ID" == 1)
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
  |> yield(name: "mean")

Same question about the EUI line. The exception is it,s a string instead of a int

from(bucket: "borealis")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "borealis")
  |> filter(fn: (r) => r["_field"] == "TEMPERATURE")
  |> filter(fn: (r) => r["_field"] == "EUI" == 2CF7F1C052400221)
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
  |> yield(name: "mean")

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 199

Trending Articles