Don't understand "displayName" at all for columns

Hello, I have some data coming in via influx v2 and so far it is appending all columns for the labels, this is “city” and “country”

So my graph looks like this:

image

I want to add a dash between city and country, I cannot use regex because city names and country names can vary a lot, multiple words, etc…

I tried many variations of ${_field.XXX} but nothing comes back…

Is there an easy way to select specific columns from the data set and handle their display?

I would like it to be for example:
Bury - United Kingdom
Brussels - Belgium
etc

Hi yosiasz thank you for the response, while i have not yet figured out how to properly handle displayName this has put me on a path to be able to format data a bit nicer from influx.

With your suggestion, I did this and it works nicely:

  |> map(fn: (r) => ({r with full_name: r.city + " - " + r.country}))
  |> keep(columns: ["full_name", "count"])

Keeping just the full name and the count and now it renders as I wanted in Grafana, thank you!

1 Like