Join which allows empty datasets or default values

I have two data sets I would like to combine into a single table. The table should include mean rsrp for both 4G and 5G. However not all devices are in 5G coverage and will not report any rsrp.

Set A
Serial  rsrp_4g
000001  -54
000002  -74
000003  -64
000004  -54
000005  -54
Set B
Serial  rsrp_5g
000001  -85
000002  -75
000003  -65

Using join I end up with just the rows which has both 4g and 5g. The rows with 4G only are left out

join(A,B)
Serial  rsrp_4g rsrp_5g
000001  -54     -85
000002  -74     -75
000003  -64     -65

Using union I end up with duplicate serial numbers

union(A,B)
Serial  rsrp_4g rsrp_5g
000001  -54    
000002  -74    
000003  -64    
000004  -54
000005  -54
000001           -85
000002           -75
000003           -65

What I would like is to combine both data sets like join, but with NULL or some default value where there are none. Any ideas on how to get to that result?

dontexist.combine(A,B)
Serial  rsrp_4g rsrp_5g
000001  -54     -85
000002  -74     -75
000003  -64     -65
000004  -54     NULL
000005  -54     NULL

Hi @eriktar

This looks like a very influx-y question. I think the InfluxDB community might a better place for it, perhaps?

If this relates specifically to Grafana please do clarify :+1:

Thanks for the reply @mattabrams! I’ll test my luck in that forum in stead.

I found an workaround in the mean time by the way. By doing individual searches and using the merge transformation in Grafana I got the table I was wanting to build.

1 Like