Splunk Search

Why am I getting error "File has no line endings" when trying to upload my lookup CSV file?

Path Finder

Every time I try I try to upload my CSV, I receive the following message:

Encountered the following error while trying to save: In handler 'lookup-table-files': File has no line endings.

I added the file directly to the $SPLUNK_HOME/etc/apps//local/, but no results are returned. Any thoughts?

Tags (3)
0 Karma


I had an xls file that I saved over as .csv to use as a lookup and I got this error when trying to use the file that way. I advise to bring the file in to notepad++, click view->show symbols-> show all characters, you want to see CR LF af the end of each line. If you see CR only go to edit->EOL Conversion->Windows Format.

As info CR stands for Carriage Return
LF stands for Line Feed

Linux format only uses CR whereas windows format uses CR and LF together. Apparently splunk is looking for these LF indicators to denote line endings.

0 Karma


Just open a CSV file with a text editor like Sublime for example, remove extra characters at the end, save it as a CSV file.


I opened that CSV file with notepad++ and hit enter in the last of first row.
so my csv now has 2 rows.
i saved it and it didn't give the error this time.

0 Karma

Splunk Employee
Splunk Employee

This is a common problem when converting an Excel file to CSV. Try saving it as Windows Comma Separated Value (.csv), then you should be able to successfully upload the lookup.

(Thanks to some friendly PS consultants for the help!)


is your file utf8 encoded? and .csv? if added manually the csv file has to be in $SPLUNK_HOME/etc/apps/app_name/lookups then you need to add the following in $SPLUNK_HOME/etc/apps/app_name/local/transforms.conf :

[<any name>]
filename = myfile.csv
0 Karma