I am discovering the “Config from Query Result” transformation and wonder whether it is supposed to allow assigning field label. Is there any information stating whether and how field labels could be assigned through this transformation ?
What Grafana version and what operating system are you using? Grafana 13.1
What are you trying to achieve?
I am looking for a way to assign labels to columns (or fields) based on external datasource
(json configuration, query, …)
How are you trying to achieve it?
I try and leverage the Config from query results transformation in order to assign field label
What happened?
Label was not assigned/overriden by the Config from query results transformation
What did you expect to happen?
I expect the label to be assigned/overriden based on data handled by the Config from query results transformation
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were. No error
Did you follow any online instructions? If so, what is the URL?
I tried and adapted instructions from reference documentation ( Transform data | Grafana documentation )
Config from query results does not directly support assigning arbitrary field labels. It applies supported field configuration options, such as unit, min, max, thresholds, and value mappings, to fields selected under Apply to. Field labels and display names are separate concepts.
Set field display names: Use the Display name option if available in your version. This changes how a field is displayed, but does not assign field labels.
Create fields with labels from rows: The Rows to fields transformation can convert rows into fields and map additional columns to field labels. However, it operates on the query result being transformed; it does not directly apply labels from a separate configuration query to existing fields.
Rename existing columns dynamically: If the names are known in advance, Organize fields by name or Rename by regex may help. For dynamic renaming based on an external mapping, the solution depends on the structure of your data and may require handling the mapping in the query itself.
For more details, see the
, particularly the sections on Config from query results and Rows to fields.
If your specific requirement is to populate field.labels from a separate query, that would likely require a feature enhancement.
Could you share a small example of your main query result and the external mapping data, along with the expected output? We can then suggest the most suitable approach.