Getting Data In
Highlighted

Preformat Automatic Report - CSV

Path Finder

I have written a report that I wish to have delivered automatically by Splunk in a csv file so I can open it in excel. The first few tests I have ran are sending the report in a csv file but in instances where there are several items in one 'cell', a new line character is inserted.

My data is currently appearing like this:
ID Product Delivered
1234 TV\nRadio\nDVD Y\nN\nY

But I want it to appear like this
ID Product Delivered
1234 TV Y
Radio N
DVD Y

Is there anyway I can format the information in the csv before it is sent out?

Tags (2)
0 Karma
Highlighted

Re: Preformat Automatic Report - CSV

Legend

I think it is problematic to output data into a CSV when you have multivalued fields. I would suggest that you use some commands such as mvexpand to eliminate the multivalued fields and then export your data to CSV. Or don't use the list or values functions for reports that you intend to export.

View solution in original post

0 Karma
Highlighted

Re: Preformat Automatic Report - CSV

Path Finder

mvexpand does seem to be the right idea, but I have several multivalue fields in my report - 4 fields each with a minimum of 5 values - I have tried using multiple mvexpand statements but this causes some very strange errors

0 Karma