I was hoping if someone could give me more insights on how fields are handled in flux lang.
Let’s say I have a measurement “m1” with two fields “f1” and “f2” how should I use flux if we need both the fields in the same graph.
|>filter(fn: ® => r._measurement == “m1” and r._field =~ /^f1|f2/ )
|>group(columns: [“time”], mode:“by”)
|>duplicate(column: “_stop”, as: “_time”)
This gives me an error saying “f2” does not exist.
I believe this is because for each time I have two records one with “f1” and other with “f2”.
Also, If I want to show two fields in a graph each from a different measurement should I use a join or union which is a better way.
As far as I understand the data is visualized based on the number of tables returned by the flux query, each table will be a line.
Please correct me if I am wrong.