Our company stores pool controller data in influxdb and uses Grafana to plot dashboards with the infux data. For reasons beyond my influence some of the data is stored as a string, for example:
time filtration_mode filtration_status filtration_time_remaining
---- --------------- ----------------- -------------------------
1520676696532993722 MAN OFF 0
The company now wants to use the string values in a time/graph element that only displays integer/floats/etc. Is there a way to query the influxdb so that the query returns predefined integer when a string value is encountered. For example return a 0 when filtration_status = OFF and a 1 when filtration_status = ON in the example above.
I know the company can change the way the data is inserted in influx and insert a 0/1 but unfortunately the insert proces is out of scope for me so i have to do with what i can query from the influxdb.
Thanks