This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Influxdb read and write to LM object
#1
Hello,

I am looking for a script that reads from InfluxdbV2 bucket with a flux query and write the result to a LM group object. 
Has anybody done this?

Flux query example:

from(bucket: "HR7")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: ® => r["_measurement"] == "Platerigg")
  |> filter(fn: ® => r["Component"] == "Mettler")
  |> filter(fn: ® => r["Name"] == "Vekt")
  |> filter(fn: ® => r["Position"] == "Platerigg")
  |> filter(fn: ® => r["_field"] == "Mettler:AI01")
  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
  |> yield(name: "last")


Kind reagrds
Thomas
Reply
#2
This thread has some examples that can be modified for your use case: https://forum.logicmachine.net/showthread.php?tid=1531
Reply


Forum Jump: