set_metric_metadata

set_metric_metadata @metadata

Points the current metric dataset at another bound dataset that implements the "metric_metadata" interface so type, unit, and description strings can be loaded from that companion dataset instead of living on each point row.

The argument must be a dataset reference (for example @definitions); it cannot be empty or refer to the dataset itself. The input must already implement "metric" without type, unit, or description columns wired on that interface—those columns must not be set on the metric interface when using this verb, or compilation fails. The referenced dataset must exist in the compilation environment and expose the metric-metadata interface. Output rows and visible columns match the input; only metadata describing where metric catalog fields are resolved is updated. If you prefer inline metadata columns, declare them on interface "metric" instead of using this verb.

Categories

Accelerable

set_metric_metadata is always accelerable if the input is accelerable. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.

Examples

make_col metric:"reading", value:float64(month_number)
interface "metric", metric:metric, value:value
set_metric_metadata @metric_defs

Shows the usual pattern: define a lean metric interface on shaped data, then delegate catalog fields to a separate @metric_defs dataset that must implement "metric_metadata" and be bound in the workspace.