You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
thank you for having developed such a nice node!
I'm using the stackhero-influxdbv2 node version 1.0.4 with Node-red v. 3.0.2. with influxdb v.2.5 on a windows 11 pro pc.
Following your code example it's been very easy to write a measurement with multiple fields, but I struggle in querying more than one field in order to plot them in a table or a multiline graph for example.
Since I got no reply I investigated the flux syntax and find out the solution with more than one field and to assemble the output of multiple fields in one row using pivot() function as in the example:
Uh oh!
There was an error while loading. Please reload this page.
Hi,
thank you for having developed such a nice node!
I'm using the stackhero-influxdbv2 node version 1.0.4 with Node-red v. 3.0.2. with influxdb v.2.5 on a windows 11 pro pc.
Following your code example it's been very easy to write a measurement with multiple fields, but I struggle in querying more than one field in order to plot them in a table or a multiline graph for example.
Using this code I get "records" correctly:
msg.topic = [
'from(bucket: "domotica") |> range(start: -3d)',
' |> filter(fn: (r) => r._measurement == "energy")',
' |> filter(fn: (r) => r._field == "consumption")'
].join('\n');;
return msg;
but adding another r.field such as r._field == "production"):
msg.topic = [
'from(bucket: "domotica") |> range(start: -3d)',
' |> filter(fn: (r) => r._measurement == "energy")',
' |> filter(fn: (r) => r._field == "consumption")',
' |> filter(fn: (r) => r._field == "production")'
].join('\n');;
return msg;
returns an empty object!
Can you please provide the correct syntax to be able to query more than one field in the same response msg from influxdb?
The text was updated successfully, but these errors were encountered: