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

0 Karma

kml_uvce
Builder

is this working for you ?

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!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Splunk Observability Synthetic Monitoring - Resolved Incident on Detector Alerts

We’ve discovered a bug that affected the auto-clear of Synthetic Detectors in the Splunk Synthetic Monitoring ...

Video | Tom’s Smartness Journey Continues

Remember Splunk Community member Tom Kopchak? If you caught the first episode of our Smartness interview ...