Reporting

How to get values from two lookups to my current search?

revanthammineni
Path Finder

Hi Splunkers, I need a help in coming up with a logic in getting values from two lookups to my current search.

I'm working on a search which has a field "customer" and I need to bring their ids from two different lookups. Basically, I have to check both the lookups for their ids and write them in the field called "ID" in my current search. TIA

Search :

customer       ID
a                     

b         

c         

d           

e         

lookup 1                                   lookup 2
customer       ids                    customer      ids
a                         1                         d                      4
b                         2                         e                      5
c                         3                         a                      1
                            

Labels (1)
Tags (3)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @revanthammineni,

you have to apply two times the lookup command (https://docs.splunk.com/Documentation/Splunk/9.0.3/SearchReference/Lookup) , something like this:

<your_search>
| lookup your_lookupA.csv customer OUTPUT ids
| lookup your_lookupB.csv customer OUTPUT ids
| table customer ids

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...