Splunk Dev

Table results that do not match a value within a lookup file

epw0rrell
Path Finder

Hello,

I have a lookup table with fields user and src.

I want to table results [user src] where the src within my search != the src listed within the lookup table.

So first I need to search for matching user rows, then I need to compare the src of the search with the src value in the lookup file.

If the src is different, I want to table the new src value from the search.

Can someone help me with this?  Thanks so very much.

0 Karma
1 Solution

livehybrid
SplunkTrust
SplunkTrust

Hi @epw0rrell 

Try the following

index=*  <<Your Other Search Criteria>>
| lookup your_lookup_table user AS user OUTPUT src AS lookup_src
| where isnotnull(lookup_src) AND src != lookup_src
| table user src

Please let me know how you get on and consider adding karma to this or any other answer if it has helped.
Regards

Will

View solution in original post

livehybrid
SplunkTrust
SplunkTrust

Hi @epw0rrell 

Try the following

index=*  <<Your Other Search Criteria>>
| lookup your_lookup_table user AS user OUTPUT src AS lookup_src
| where isnotnull(lookup_src) AND src != lookup_src
| table user src

Please let me know how you get on and consider adding karma to this or any other answer if it has helped.
Regards

Will

Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...