Splunk Search

How to use join command to keep events from subsearch that do not match with parent search?

sloshburch
Splunk Employee
Splunk Employee

My understanding of the documentation (and my experiments) is that the inner keeps only events that match both searches, left keeps matches as well as items that were in the parent search but not in the child search, and outer keeps ONLY events that did not match from both searches. Unfortunately, I can't figure out how to keep items from the subsearch.

The search that I have set as the parent search returns more than 50k events and therefore can't be the subsearch.

Any ideas how to use the join command where the search keeps any events from the subsearch that do not have matches with the parent?

Tags (3)
1 Solution

somesoni2
Revered Legend

You might be able to do it without join (using stats). Could you provide your two searches?

View solution in original post

strive
Influencer
0 Karma

somesoni2
Revered Legend

You might be able to do it without join (using stats). Could you provide your two searches?

sloshburch
Splunk Employee
Splunk Employee

Thanks. That is exactly how I interpreted your tip. Ideally I get them on the same initial search but at the least I think I'll be all set using stats. Thanks again!

0 Karma

somesoni2
Revered Legend

Just for reference (see 2nd answer) http://answers.splunk.com/answers/81741/full-outer-join

0 Karma

sloshburch
Splunk Employee
Splunk Employee

Yes! Stats! I think that's the way to go. Then I can use something simple like a | fields just the stuff to keep | stats latest(*) as * by unique1 unique2

Good idea!

I can't really share the actual search - they are derived from a massive amount of macros and I'm concerned they exposes a little more about the business than I'm comfortable with.

The stats is a great idea - exactly what I was looking for - a way to approach this from another direction. Thanks again.

Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...