Splunk Search

Lookup table is invalid: Extra Commas?

aapittts
Path Finder

I have a lookup table that I am getting an invalid error on. I believe its because there are extra commas in the data. The lookup table is two fields: codes and descriptions. The descriptions naturally have some commas in them. Is it possible that this is causing the invalid table error? If so, can I create custom regex for this issue?

Tags (1)
0 Karma
1 Solution

cramasta
Builder

I tried throwing extra commas in one of my lookups but it did not throw a error, it just messed up the data that the lookup provided.

Try putting text qualifiers "" around your fields like this

"item1", "some text with a , in it"
"item2", "another text with 2 ,, "

This will allow it to ignore commas that are part of the description

View solution in original post

0 Karma

barakreeves
Splunk Employee
Splunk Employee

I have run into the same issue before on a "simple" lookup table having only 2 fields and also had trouble finding the issue. This is what I did:

1- search for line break at the end of the line
2- search for lines not matching pattern "your data", "your data" such as a line with only 1 value or no value; sometimes Excel torques an innocent csv file and therefore, I try to do a quick eyeball check in my favorite text editor
3- check the limits.conf under the stanza "lookup" to see if it is a size violation

Wish you success!

0 Karma

cramasta
Builder

I tried throwing extra commas in one of my lookups but it did not throw a error, it just messed up the data that the lookup provided.

Try putting text qualifiers "" around your fields like this

"item1", "some text with a , in it"
"item2", "another text with 2 ,, "

This will allow it to ignore commas that are part of the description

0 Karma

fu8R5juiNP64AKI
Explorer

@aapitts What was your issue then? I am running into the same problem.

0 Karma

aapittts
Path Finder

My issue wasn't commas but this is good to know.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...