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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...