Splunk Search

Lookup Table and csv file

anwarmian
Communicator

This is not a question. I just wanted to put two cents worth of my experience with a lookup table and a csv file. This lookup table was able to match some values from a field and not others. What I ended up discovering that one of the rows in the lookup table had an extra field and that was messing up every lookup after that. So if you have a csv file please open it in a spreadsheet and check to make sure that all the rows line up properly with the columns.

Example:

"Country_Code","Country_Name","Continent"
"CN", "CHINA","ASIA"
"ES", "SPAIN", "","EUROPE"
"UK", "UNITED KINGDOM", "EUROPE"

In the above example since SPAIN has an additional column any lookup after SPAIN will provide either a blank or a default value that you used in creating the lookup. This is strictly from my experience. I'll be happy to get feedback from others.

Tags (2)

woodcock
Esteemed Legend

The same thing will happen if you have unmatched (unterminated) parentheses.

0 Karma
Get Updates on the Splunk Community!

How to Send Splunk Observability Alerts to Webex teams in Minutes

As a Developer Evangelist at Splunk, my team and I are constantly tinkering with technology to explore its ...

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...