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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...