Replace header with data from different query

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

Docker Image - v 9.1.6 with json api 1.3.1 from Marcus Olsson

  • What are you trying to achieve?

I have two separate JSON REST queries. A and B. A sets up a table with headers. Table B has names I’d like to use as headers in table A. The order of B is aligned with the headers of table A.

  • How are you trying to achieve it?

Use transform functions to replace headers in table A.

Table A:

Date             Count    0  1  2  3
xxx              9        1  2  5  1 
xxx              19       2  7  4  6

Table B:

Host A
Host B
Host C
Host D

Expected result

Date             Count   Host A   Host B   Host C   Host D
xxx               9      1        2        5        1
xxx               19     2        7        4        6