Rename columns in nodes dataframe

I’m using a Node Graph panel with Prometheus (format = table) and my nodes query returns a single nodes dataframe with fields like id, title, and Value #nodes. I want to show an additional value in the node click drawer, so I need a column whose field name starts with detail__ (for example detail__messages_received). I tried using rename by regex and field display name overrides to rename Value #nodes to detail__messages_received, but although the display label changes in the UI, the Node Graph does not recognize it as a detail field. In Inspect → Data, the underlying field still appears as Value #nodes. What is the correct way to actually rename the field key (not just the display name) so that the Node Graph panel treats it as a real detail__* field and shows it in the node details drawer?

Did you try label_replace on the PromQL level?

I once found something that could work like a workaround. If the detail field is the value returned by the query, you can use Add field from calculation transformation - this way, the field will be named anything that you type in the Alias option - it’s considered a new field so it works with the node graph. If it’s in a label, you can try label_replace function in your query to rename the label.

1 Like

Use Organize fields by name Transformation


1 Like

I’m unable to use a Organize fields by Name transformation because I have two queries returning two datasets. And Organize fields by Name transformation only works when there’s one dataset. Atleast that what the warning says.

label_replace can only modify labels. The problem we’re facing is with the metric value itself - the numeric data point that Grafana puts into the “Value #nodes” column. Metric value → becomes “Value #refId” column

Before organize fields transformation you use merge transformation then apply organize fields and arrange according to you and rename also work.