Getting Data In

Hunk - SimpleCSVRecordReader

tt1
Explorer

Hi,

I have been recommended the SimpleCSVRecordReader to convert CSV to JSON.

I have tried to set up a Virtual Index Provider, but taking the default settings, but including the following line;

vix.splunk.search.recordreader com.splunk.mr.input.SimpleCSVRecordReader

When I try to use this against a file containing csv data it returns no results, yet by reseting the above line to default it returns results.

Any help appreciated.

Tags (3)
0 Karma
1 Solution

Ledion_Bitincka
Splunk Employee
Splunk Employee

Was that a typo or did you properly set the record reader as follows?

vix.splunk.search.recordreader = com.splunk.mr.input.SimpleCSVRecordReader

View solution in original post

Ledion_Bitincka
Splunk Employee
Splunk Employee

Was that a typo or did you properly set the record reader as follows?

vix.splunk.search.recordreader = com.splunk.mr.input.SimpleCSVRecordReader

tt1
Explorer

Ledion, many thanks for your help, you reminding me of the search.log helped. After checking that and googling the error in that log, I found an answer suggesting that I had chosen the incorrect version of Hadoop in my provider settings.

Selecting the correct version has solved the problem.

Thanks again for answering.

0 Karma

Ledion_Bitincka
Splunk Employee
Splunk Employee

The SimpleCSVRecordReader will only recognize certain file extension by default, you can override the default by setting

vix.splunk.search.recordreader.csv.regex

If that doesn't work, it would be great if you provide a link to the contents of search.log for your search so I can help troubleshoot the issue further

0 Karma

tt1
Explorer

Thanks for answering.

Yes using the web interface I have set vix.splunk.search.recordreader to com.splunk.mr.input.SimpleCSVRecordReader

Also tried

com.splunk.mr.input.SimpleCSVRecordReader, com.splunk.mr.input.ValueAvroRecordReader

as per this link

http://blogs.splunk.com/2013/09/27/hunk-setup-using-hortonworks-hadoop-sandbox/

not a lot out there on this subject.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Agentic Operations Start with Context: Build the Right Data Foundation

Agentic Operations Start with Context: Build the Right Data Foundation   By Courtney Wright, Product Marketing ...

Assisted, Augmented or Agentic? Choose Your Splunk Starting Point

Assisted, Augmented or Agentic? Choose Your Splunk Starting Point   By Courtney Wright, Product Marketing ...

Session 2 | Beyond the Thread: Operationalizing AI with Confidence

Session 2   Beyond the Thread: Operationalizing AI with Confidence    The true power of the Cisco Data Fabric ...