Splunk Search

Simple way to turn multivalue field into a table?

alexander_lucas
Explorer

Is the a function that does this:

... | mvmap data (fname, lname, age, height) | table lname, age

(where data is a multivalue field)

Tags (2)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

No. You probably need something like:

... | fields lname age | eval z=mvzip(lname,age,":") | mvexpand z | eval z=split(z,":") | eval lname=mvindex(z,0) | eval age=mvindex(z,1) | fields - z

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

No. You probably need something like:

... | fields lname age | eval z=mvzip(lname,age,":") | mvexpand z | eval z=split(z,":") | eval lname=mvindex(z,0) | eval age=mvindex(z,1) | fields - z
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...