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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...