Alerting

How to write a query for getting data that is not present in lookup table

aaa2324
Explorer

How to write a query for getting data that is not present in lookup table, compare the input data with lookup table and find only the data is not present in lookup table.

already tried below query not working

index=abc sourcetype=xyz
| lookup data.csv ccid OUTPUT ccid AS found
| where isnull(found)

 

Labels (1)
0 Karma

aaa2324
Explorer

Thanks will try that keep you posted with the results

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @aaa2324,

you have to use a subsearch of the main search containing an inputlookup command, only one attention: fieldnames must be the same both in main search and lookup or remene one of them.

Please try something like this:

index=abc sourcetype=xyz NOT [ | inputlookup data.csv | rename ccid AS found | fields found ]
| ...

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...