Did you enter the search in Studio's visual editor or did you insert them directly into source? Is there some mistyping/miscopying? There is nothing wrong with rename. You can try out this test da...
See more...
Did you enter the search in Studio's visual editor or did you insert them directly into source? Is there some mistyping/miscopying? There is nothing wrong with rename. You can try out this test dashboard {
"dataSources": {
"ds_FAnSoMB1": {
"type": "ds.search",
"options": {
"query": "| makeresults\n| eval _raw = \"{\\\"data\\\":[{\\\"name\\\":\\\"B\\\"},{\\\"name\\\":\\\"D\\\"},{\\\"name\\\":\\\"b\\\"},{\\\"name\\\":\\\"d\\\"}]}\"\n| spath\n| fields - _*\n| rename data{}.name as name",
"queryParameters": {
"earliest": "-24h@h",
"latest": "now"
}
},
"name": "Table search"
}
},
"visualizations": {
"viz_qVGDM9DA": {
"type": "splunk.table",
"options": {
"count": 100,
"dataOverlayMode": "none",
"drilldown": "none",
"showRowNumbers": false,
"showInternalFields": false
},
"dataSources": {
"primary": "ds_FAnSoMB1"
}
}
},
"inputs": {
"input_global_trp": {
"type": "input.timerange",
"options": {
"token": "global_time",
"defaultValue": "-24h@h,now"
},
"title": "Global Time Range"
}
},
"layout": {
"type": "grid",
"options": {
"width": 1440,
"height": 960
},
"structure": [
{
"item": "viz_qVGDM9DA",
"type": "block",
"position": {
"x": 0,
"y": 0,
"w": 1440,
"h": 250
}
}
],
"globalInputs": [
"input_global_trp"
]
},
"title": "DS dashboard and rename command",
"defaults": {
"dataSources": {
"ds.search": {
"options": {
"queryParameters": {
"latest": "$global_time.latest$",
"earliest": "$global_time.earliest$"
}
}
}
}
},
"description": "https://community.splunk.com/t5/Splunk-Search/Rename-works-in-search-but-not-in-Dashboard-Studio/m-p/671192#M230030"
} The search used is simply | makeresults
| eval _raw = "{\"data\":[{\"name\":\"B\"},{\"name\":\"D\"},{\"name\":\"b\"},{\"name\":\"d\"}]}"
| spath
| fields - _*
| rename data{}.name as name The dashboard gives the exact same output.