influxdbchronograf

What is the equivalent of a UNION statement


I need to chart physical measurements using Influx. All measurements are stored as series inside a single Influx "measurement". Some are "current" values like temperatures, other are things like energy meter readings.

The problem is that these need different queries in order to produce visually attractive output. Charting the meter readings as current power is possible using the DIFFERENCE function.

SELECT difference(max("value")) AS "diff_value" 
FROM "volkszaehler"."autogen"."data" 
WHERE time > :dashboardTime: 
GROUP BY time(1d), "title" FILL(linear)

For other values like temperatures the selection should be mean("value") without the difference.

Is there a way to "union" result sets in InfluxDB similar to mysql in order to display them in a single chart in Chronograf?


Solution

  • Sorry, this isn't possible and new functionality isn't being added to InfluxQL while Flux is being actively worked on.

    https://github.com/influxdata/flux