Splunk Search
Highlighted

How to build dynamic columns using a Splunk search for data from an indexed CSV file without headers?

Path Finder

Our application has CSV log files and the CSV is indexed in Splunk, but our CSV does not have any column headers. How do I build a search to read the below data and create field names myself with a search?

Below is our Test Data in the CSV file:
Tester, test, testing
coder, code, coding
manger, lead, leader

I wanted to create a table with field1, field2, field3 where the data from each column goes correctly into each field.

0 Karma
Highlighted

Re: How to build dynamic columns using a Splunk search for data from an indexed CSV file without headers?

Esteemed Legend

Like this:

props.conf:

[YourSourcetypeHere]
TRANSFORMS-ThisNameIsArbitraryButShouldBeUnique = commalist

transforms.conf:

[commalist]
DELIMS = ","
FIELDS = field1, field2, field3