influxdata/influxdb

[Feature Request] Allow `WHERE` clause in `show field keys`

Closed this issue · 19 comments

Feature Request

Proposal:

Show field keys API currently only allows for a measurement to be specified.

It would be great to also be able to limit field key list on tag values via where clause, for example:

SHOW FIELD KEYS FROM <measurement> WHERE <tag key>='<tag value>'

Current behavior:

Show field keys only accepts FROM

Desired behavior:

Show field keys to also optionally accept WHERE <tag key>='<tag value>' [AND|OR <..>]

Use case:

Use case is client filtering of key list on a specific tag or set of tags, eg grafana field key list and other visualisation clients.

Without this it is not possible to retrieve a field key list on a specific tag value,
all field keys for all tag values in the measurement are returned instead.

This makes it impossible for clients to get which field keys are valid for a particular tag and users are forced to go through a potentially very large field key list and try them out one by one to get which fields belong to the tags they are interested in.

+1

+1

+1

+1
@rbetts , Milestone 1.4.0 passed by. Still in progress?

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

+1

Hortt commented

+1

+1 - that would be really valuable

+1

+1

+1 this will really be a big improvement! I work with thousands of fields and every time it is almost impossible to know which tag they are connected to. this upgrade would really save a lot of time. It would also be very useful for any troubleshooting regarding incorrect data entry.
finally, if you work with grafana you know how precious this is for a thousand other reasons.