Getting Data In

The exported csv file of the Splunk results is not aligned

santosh_hb
Explorer

Hi, I have exported my search results into a csv file using Export button.
The output result contains a list of Email adresses that are field values.

But, the contents of csv file looks like below:
test@test.com email@sample.com data@test.com.....

whereas I want the output as below:
test@test.com

email@sample.com

data@test.com

I am using the below query for getting the output:
stats values(EMAIL_DATA) AS COMBINED_EMAIL

Output in splunk looks like below:

COMBINED_EMAIL
test@test.com

email@sample.com

data@test.com

Kindly help me with the formatting issue.

Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Instead of stats values(EMAIL_DATA) creating a multi-value field, use stats count by EMAIL_DATA. Then use fields and/or rename to format the data however you like.

View solution in original post

0 Karma

woodcock
Esteemed Legend

Add this to the end of your search:

... | mvexpand COMBINED_EMAIL
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Instead of stats values(EMAIL_DATA) creating a multi-value field, use stats count by EMAIL_DATA. Then use fields and/or rename to format the data however you like.

0 Karma

santosh_hb
Explorer

It works fine.

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...