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 (2)
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!

Introducing the Splunk Community Dashboard Challenge!

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

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...