Grafana value mapping by query

Hello,

we are using grafana to visualize sensor data of a control unit. One use case is to show event messages in a table view. Each event type is represented by a unique id (There are 154 different event types). How is it possible to map a string value for each ID without assigning each key/value pair manually. Database for the message log is an InfluxDB. The assigment table can be converted in any required data source by telegraf.
Thank you in advance
Best regards,
Kai

Welcome,

are the string values currently in influxdb bucket? Also are you using influxql or flux query language?

Hello,

I managed it to import the table into InfluxDB v1.8 via telegraf.


Iā€™m using InfluxQL as query language.

not sure about influxql but can you try something like this?

select map.EN
from "the_other_table" as src
inner join "id_txt" as map 
where src.ID = map.ID

You might want to look at starting to use flux query language, influxql is on the way our if not already out. you get more power function programming style querying ability, much more powerful!

1 Like