Table: joining MS SQL and InfluxDB queries

  • What Grafana version and what operating system are you using?
    v8.0.3 (cae5c5e46b)
    Windows 10

  • What are you trying to achieve?
    In a table panel, I have several queries on a MS SQL source and would like to join a query on an InfluxDB (v0) source on a common field.

  • How are you trying to achieve it?
    I have used the Outer join Transform.

  • What happened?
    The Outer join Transform works among the SQL queries, but when the InfluxDB query is added the join doesn’t happen and all the SQL query results disappear from the table.

  • What did you expect to happen?
    I’d expect that the InfluxDB query results would be added to the table as with the other queries

  • Can you copy/paste the configuration(s) that you are having problems with?
    For example, the SQL queries are like:

SELECT [SiteName]
  FROM [foo].[bar].[bas]

The InfluxDB query is

SELECT count("value") 
FROM "event" 
WHERE $timeFilter 
GROUP BY "SiteName"

And the Outer join is done on the field SiteName

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?
    I’ve looked up resources s but none was specifically about this issue

Just to add:

Return from the MS SQL query

Return from the InfluxDB query

@felipefischmann Hii can you tell me, did you achieve the above thing? and if yes how? I would like to join Influx data and Mysql data in single table

I suppose there is same value in the two columns “SiteName” ?
have you the same key type from the two datasources ?
please share us your data format and more information

Somehow it works, no changes from what was described above

It only works however when both queries are formatted as Table. Ideally I’d like to have the bottom query formatted as a series to use in a Heatmap panel: the goal would be to use the SiteDescription instead of the SiteName as the metric name, but in InfluxDB they are stored as the SiteName.

1 Like