I want to filter measurements names based on a tag value.
I have multiple measurements in a bucket, all measurements have a tag called “enabled”.
I can simply get all measurements names with the following flux query:
By default, data returned from InfluxDB is already grouped by measurement. But this means that each unique measurement in your steam of tables is structured as a unique table. distinct() operates on each table, not the stream of tables as a whole.
The reason that query errs is because you have fields with different types. When you try to “ungroup” (group()) data, the _value columns must be the same type.
Thinking through this a little more, I think this will give you what you’re looking for and will be the most performant: