Splunk Search

How to make the value to be column

chrismok
Path Finder

Hi All,

I remember that Splunk has a command to make the value to column but I forgot it. Anyone remember?

Here the example.

The log file looks like that

Mary.score=65
Tom.score=90
Amy.score=100
Cammi.score=20

For the result, you can see the result that the name will be moved as column name

Mary  |  Tom  | Amy  | Cammi
===========================
65      90     100       20
Tags (1)

kml_uvce
Builder

Try this

...|chart values(Mary_score) AS Mary values(Amy_score) AS Amy values(Tom_score) AS Tom values(Cammi_score) AS Cammi

kamal singh bisht
0 Karma

kml_uvce
Builder

is this working for you ?

kamal singh bisht
0 Karma

chrismok
Path Finder

Yes, but it is quite hard code....

0 Karma

somesoni2
Revered Legend

Transpose command would work for you if there is only 1 row.

Try this.

Your search producing above output | eval key=1 | untable key name score | fields - key

pradeepkumarg
Influencer
0 Karma

chrismok
Path Finder

Hi gpradeepkumarreddy,

This command do not able to make my result.

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...