schema.measurementTagValues() function

The schema.measurementTagValues() function returns a list of tag values for a specific measurement. The return value is always a single table with a single column, _value.

  1. import "influxdata/influxdb/schema"
  2. schema.measurementTagValues(
  3. bucket: "example-bucket",
  4. measurement: "cpu",
  5. tag: "host"
  6. )

Parameters

bucket

Bucket to return tag values from for a specific measurement.

*Data type: String*

measurement

Measurement to return tag values from.

*Data type: String*

tag

Tag to return all unique values from.

*Data type: String*

Function definition

  1. package schema
  2. measurementTagValues = (bucket, measurement, tag) =>
  3. tagValues(
  4. bucket: bucket,
  5. tag: tag,
  6. predicate: (r) => r._measurement == measurement
  7. )

*Used functions: schema.tagValues()*

Related articles

tags