- What Grafana version and what operating system are you using?
v9.4.7 (Ubuntu 20)
- What are you trying to achieve?
I want to rename the column data from tracking_trackingdata_2022_jan
to 2022 Jan
by removing tracking_trackingdata_
from the beginning.
There is a row tracking_trackingdata_default
for which I just want to keep default
by removing other strings.
Tabular data
- How are you trying to achieve it?
I tried using Value Mapping with Regex
with regex value (default|(\d{4}_\w{3}))$
-
What happened?
Value is not renaming as expected
-
What did you expect to happen?
The value should be renamed.
-
Can you copy/paste the configuration(s) that you are having problems with?
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
-
Did you follow any online instructions? If so, what is the URL?
Hi,
Did you try Rename by Regex in transform tab.
And in the replace ,leave a space.you will see 2022_jan.
again add one more time, rename by regex and now this time replace _ by space.
This regex is not working for me. Please note I’m using datasource from a different panel in the dashboard.
Can you share screenshot of what you have tried?.It doesn’t matter you can change apply regex in original panel or in this panel.
Please see the screenshot
What is your data source?
Datasource is another panel in the dashboard, whose data source is PostgreSQL
Instead of regex to change those names use some postgres function to rename and clean up those data poihts
Replace function for example
@yosiasz Thanks for the suggestion. But we can’t use the Postgres function to replace it because the same panel is also used in another panel where the exact value is required.
One way is to write a Postgres query for this panel separately, which is not something I’m interested in, as I already have data in one panel that can be used, instead of running an additional query.
1 Like