Splunk Search

Lookup multiple values for one field

gauldridge
Path Finder

My lookup table contains two columns: one for the input field and one for the value which will be populated into the new field created by my lookup.

If the lookup table does not contain unique values in the input field column, how can I get every matching value from the "value" coulmn.

My thinking was that the "Maximum matches" field in "Advanced Options" under the "Lookup Definition" menu would allow more than one value to be returned for a specific input field. If so, how are the values returned? If not, how can I get all the values in the lookup table that correspond to the input field?

Tags (1)
0 Karma
1 Solution

lguinn2
Legend

You should try it and look at the results. Yes, Splunk will return more than 1 match. If there are multiple matches, the output fields are created as multi-valued fields.

There are a variety of commands and functions within Splunk that can manipulate multi-valued fields. The eval command has a number of useful functions.

View solution in original post

0 Karma

lguinn2
Legend

You should try it and look at the results. Yes, Splunk will return more than 1 match. If there are multiple matches, the output fields are created as multi-valued fields.

There are a variety of commands and functions within Splunk that can manipulate multi-valued fields. The eval command has a number of useful functions.

0 Karma

gauldridge
Path Finder

Thanks. I didn't realize I was actually getting all of the values returned. I was expecting something like key=value1,value2,value3 not key=value1, key=value2, key=value3. I hadn't messed with multi-value fields before this.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...