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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...