Rows to fields transform

    This transforms rows into separate fields. This can be useful as fields can be styled and configured individually, something rows cannot. It can also use additional fields as sources for dynamic field configuration or map them to field labels. The additional labels can then be used to define better display names for the resulting fields.

    Useful when visualizing data in:

    • Gauge
    • Stat

    If you want to extract config from one query and appply it to another you should use the Config from query results transformation instead.

    Input:

    As you can see each row in the source data becomes a separate field. Each field now also has a max config option set. Options like Min, Max, Unit and Thresholds are all part of field configuration and if set like this will be used by the visualization instead of any options manually configured in the panel editor options pane.

    Configuration

    To do this transformation Grafana needs to know how to use each field in the input data. The UI options for this transform shows you all fields and Use as option to tell Grafana how to use the field.

    This transformation needs one field to use as the source of field names. By default the transform will use the first string field for this. But you can override this default behavior by selecting Field name in the Use as column for the field you want to use instead.

    This transformation needs one field to use as the source of values. By default the transform will use the first number field for this. But you can override this default behavior by selecting Field value in the Use as column for the field you want to use instead.

    If a field does not map to config property Grafana will automatically use it as source for a label on the output field-

    Example:

    Output:

    The extra labels can now be used in the field display name provide more complete field names.