How to join/left join multi queries on some specific columns

  • What Grafana version and what operating system are you using?
    8.5.13/9.5.6

  • What are you trying to achieve?
    I want to join/full left join table results of multi queries on specified columns, and the result must keep all rows of left table.
    Here’s an example:
    Query A return table like:
    dim1 | dim2 | dim3 | valueA
    Query B return table like:
    dim2 | dim3 | dim4 | valueB
    I want to do left join of A and B on dim3 and dim4, the join result should keep all rows of A and try to join B’s columns.
    Result table like:
    dim1 | dim2 | dim3 | dim4 | valueA | valueB

  • How are you trying to achieve it?
    I tried Outer Join and Join, but failed to work out.

  • What happened?

  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

  • 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?