Splunk Search

How do I get subquery results

bella
Loves-to-Learn Lots

Hi all,
    I have two indexes,  and I want to check whether the data from one index=a exists in the other index=b, and extract the data from the other index=a

 

 

index=a 
id
1
1
2
3
3

index=b
id,name1,name2
1,10,a1
1,9,a2
3,9,a1
4,10,a1
4,12,a2

i want the result=
id,name1,name2
1,10,a1
1,9,a2
3,9,a1

 

 

        Anyone, have a good way to guide
       Thank you!

Labels (2)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index=b [|search index=a | dedup id | table id | format]
0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...