Influxdb: SELECT "tag" not working properly

Created on 12 Feb 2017  路  4Comments  路  Source: influxdata/influxdb

The 'SELECT "tag" FROM "measurement"' query is no longer working. The query is simply blank when run. I can get results if I perform a 'SELECT "value","tag" FROM "measurement"'. That returns a column of values and tag values (as expected). 'SELECT "value","tag"::tag FROM "measurement" works as well.

Bug report

__System info:__ I am running InfluxDB v1.2.0 on OS X

__Expected behavior:__ I would expect to get a column of only tag values.

__Actual behavior:__ Nothing

__Additional info:__ This affects things like Grafana, where templating is used. If I want to create a template for a tag value, I cannot do it now.

arequeries breaking change kinenhancement

Most helpful comment

@brianm I think you could do show tag values from cpu with key =~ /.*/

All 4 comments

I don't believe this has ever worked. The select mechanism is only able to query data by time so there must be at least one field available.

@pauldix enough people run into this issue, should we consider having the query engine throw an error when only tags are requested? It might be considered a breaking change, but the current behavior never performs the expected behavior while the error would at least steer people in the correct direction.

I now see that on the documentation, it does show a required field value as well. Apologize for the filed issue.

I can say that there is a definite desire for this. In my instance, I want to use templating in Grafana. I want to find all of the possible available TAG values for a particular DB. I can then prepopulate the drop down. I know I can get field values via the SHOW TAG VALUES function, but it prepends the key name, and I don't want the key name (would be nice if I could "SELECT 'value' FROM SHOW TAG VALUES...).

I'll close the issue.

How does one find all the tag values on a measurement? Parsing "show series" ?

@brianm I think you could do show tag values from cpu with key =~ /.*/

Was this page helpful?
0 / 5 - 0 ratings