Search code examples
grafanainfluxdb

Using multiple measurements to create a view in Grafana with InfluxDB


In my Influx I have two (2) measurements called: jenkins_data and jenkins_custom_data. I want to create a view that uses fields from both measurements. Something like this:

SELECT count("build_successful") FROM "jenkins_data" WHERE "jenkins_custom_data.branch"='master' AND "build_result"='SUCCESSFUL'

Note that build_successful is a field in jenkins_data and build_result is a tag in jenkins_data while branch is a field of jenkins_custom_data

Is it possible to do such combination?


Solution

  • What you are trying to do is achieved with SQL Joins but currently InfluxDB does not support this (see this issue where it is discussed extensively).

    According to this comment by Anaisdg (influx staff) this will not be possible with InfluxQL, but will be possible in the future with the planned query language Flux