Splunk Search

Lookup more than one column in Lookup Table

sarahaydenvi
New Member

I want to return descriptions I have in a lookup table. The description corresponds to a code in my Events list. However the code is a single digit number between 0 and 9 and the code column in my lookup table has multiple 0's 1's 2's etc. My lookup table has another column 'TYPE' to parse out these codes.

Is it possible to modify the |lookup command to use the code column when the TYPE column has a specified value and return the corresponding DESCRIPTION?

alt text

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi sarahaydenvi,
you can filter lookup results inserting a variable and use as key field two fields, something like this:

index=my_index
| eval TYPE="UPDATE STATE"
| lookup my_lookup.csv CODE TYPE OUTPUT DESCRIPTION
| ...

Bye.
Giuseppe

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...