Splunk Search

commas in lookup tables

stephen123
Path Finder

hi, I am using a look-up table, however some of the fields have commas in them. - as you would expect these do not match. Any idea how to get around this,

I have tried adding a \ before the comma but this does not help
I can not remove the comma as this will not match the data

Thanks

Tags (1)
0 Karma
1 Solution

MHibbin
Influencer

If you can edit the CSV that you are using as a lookup directely, have you tried including the offending field in quotations (e.g. "). For example:

field0, field1, field2
efuieb, "foo,bar", blah
inevei, "foo", blah

Hope this helps.

MHibbin

View solution in original post

HeinzWaescher
Motivator

Hi,

I've got another comma problem with a lookup. I would like to create a lookup for field values in the eventdata like Test,A, which i want to replace with a new value.

My lookuptable looks like this:

"Test,A" - New Value

I used the quotes to achieve, that the value is not splitted up in the lookup. But then I'm not able to use the lookup, because there is no match. The values in the eventdata don't have quotes...

Any ideas how to achieve my goal?

Thanks, Heinz

0 Karma

MHibbin
Influencer

If you can edit the CSV that you are using as a lookup directely, have you tried including the offending field in quotations (e.g. "). For example:

field0, field1, field2
efuieb, "foo,bar", blah
inevei, "foo", blah

Hope this helps.

MHibbin

stephen123
Path Finder

awesome - thanks

0 Karma
Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...