Query with tags and no fields

If the query consists only of tags, the query returns an empty result. See, for example:

> select L1, L2, bytes from rpm limit 3
name: rpm
time                L1        L2   bytes
----                --        --   -----
1623628805064654000 1234 17672
1623628805064654000 1234 10596432
1623628805064654000 1234 10701024
> select L1, L2 from rpm limit 3
> select L2 from rpm limit 3
> # No results 

Is this a hard limitation of Influxdb?

The reason why I am asking, in case there is some way to bypass this alltogether, is because I am exploring some data, and the full table spans several screen widths, so being able to select a few keys of interest. But if, by chance, remove all fields, I get nothing, which is not very helpful.


Yes i believe this a limitation in Influx. See here

I had an issue with this and the way we create our alerts. We want to list all hosts and just add them to to a group for alerts, but selecting the host tag alone comes back empty so we have to select a field as well.

I’m not sure if InfluxDB 2.0 works differently.

1 Like