Splunk Search

How to Anti join select or Select NOT IN?

usarios
Engager

Hi.

I have a query A:
index="idx"  "*Processed*" | table phoneNumber
+
query B:
index="idx"  "*Sent*" | table phoneNumber

I need to get all the phoneNumbers from A which are not in B.
How can I build the whole query ?
Thanks in advance!

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

There are a few ways to do this - here is one

index="idx"  "*Processed*"
| dedup phoneNumber
| eval processed=1
| append [search index="idx" "*Sent*"
         | dedup phoneNumber
         | processed=-1]
| stats sum(processed) as processed by phoneNumber
| where processed=1
| table phoneNumber
0 Karma
Get Updates on the Splunk Community!

Leveraging Detections from the Splunk Threat Research Team & Cisco Talos

 Stay ahead of today’s evolving threats with the combined power of the Splunk Threat Research Team (STRT) and ...

Splunk ITSI & Correlated Network Visibility

 Take Your Network Visibility to the Next LevelIn today’s complex IT environments, performance issues can stem ...

Splunk Classroom Chronicles: Training Tales and Testimonials (Episode 3)

Welcome back to Splunk Classroom Chronicles, our ongoing blog series that pulls back the curtain on Splunk ...