Splunk Search

Use the result of one query as input to the next query

Deepz2612
Explorer

Hi @niketn 

Greetings..

I have a requirement where..

My first query is as below:

index = <my_index> eventtype=" " | table field1

And the values of my first query has to be used in the search of my second query

index=<my_index> source= " " and field1 values..

I tried using join it doesnt seem to help.

 

Please advice

Labels (2)
0 Karma

aasabatini
Motivator

hi 
use fields comand not table,  also if the result of the first search are less number of events you can use a subsearch.

index=<my_index>  [search index = <my_index> eventtype=" " |  fields field1]

“The answer is out there, Neo, and it’s looking for you, and it will find you if you want it to.”
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...