Splunk Search

How can I transpose/transform data in multiple rows?

quahfamili
Path Finder

Hi all,

I was preparing my data to be visualised. However, I met with a challenge. The below is an extract of my data:

alt text

My desire output would be:

alt text

Note that the key value is dynamic, there could be 10 to 20 numbers of keys.
Anyone has any idea to achieve this?

Thanks in advance!

0 Karma
1 Solution

vnravikumar
Champion

Hi

Try this

your query... 
| table key,value,field1,field2 
| eval {key}=value 
| fields - key, value 
| table *

View solution in original post

vnravikumar
Champion

Hi

Try this

your query... 
| table key,value,field1,field2 
| eval {key}=value 
| fields - key, value 
| table *

quahfamili
Path Finder

Hi it works, 1 more question for {} how do i control the numbers of keys? it seems like defaulted at 24 columns.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...