Rename by Regex for a time series date

The regex for date is - /^(\d{2}/\d{2}/\d{4}/s\d{2}:\d{2}:\d{2})$/

  • What happened?
    The field is not getting renamed to ‘Percentage’

  • What did you expect to happen?
    The field should get renamed to ‘Percentage’

  • Can you copy/paste the configuration(s) that you are having problems with?

    “transformations”: [
    {
    “id”: “formatTime”,
    “options”: {
    “outputFormat”: “MM/DD/yyyy HH:mm:ss”,
    “timeField”: “Time”,
    “timezone”: “browser”,
    “useTimezone”: true
    }
    },
    {
    “id”: “renameByRegex”,
    “options”: {
    “regex”: “/^(\d{2}\/\d{2}\/\d{4}/s\d{2}:\d{2}:\d{2})$/”,
    “renamePattern”: “Percentage”
    }
    },
    {
    “id”: “merge”,
    “options”: {}
    },
    {
    “id”: “transpose”,
    “options”: {}
    },
    {
    “id”: “formatString”,
    “options”: {
    “outputFormat”: “Substring”,
    “stringField”: “Field”,
    “substringStart”: 7
    }
    },
    {
    “id”: “organize”,
    “options”: {
    “excludeByName”: {},
    “includeByName”: {},
    “indexByName”: {},
    “renameByName”: {
    “11/25/2024 14:48:26”: “Percentage”
    }
    }
    },
    {
    “id”: “sortBy”,
    “options”: {
    “fields”: {},
    “sort”: [
    {
    “desc”: true,
    “field”: “Percentage”
    }
    ]
    }
    }
    ]

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

No errors

  • Did you follow any online instructions? If so, what is the URL?
  • Didn’t follow any specific documentation.

Hi, can you show a sample of your data in the table?

Ok, so you basically have two fields - Field and the one that looks like a date. That’s why the transformation is not working (field is the column name, it does not refer to the data itself). Which datasource are you using, maybe in there you could transform the field name?