Splunk Dev

Search result in Join Not returning all the result in second result set

karunagaraprabh
Explorer

i have two queries where each queries return two rows as result . I am join two queries using left join which have common field as customerjobid.  when i run the quires, the result set fetch only second quires  result of first row.

Tags (1)
0 Karma
1 Solution

scelikok
SplunkTrust
SplunkTrust

Hi @karunagaraprabh ,

join command joins only first event on subsearch results that each main search result can join as default. You should use "max" parameter to match more results.

| join CustomerjobId type=left max=2

You can find more info about "max" parameter below;

https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/Join#Optional_arguments

 

If this reply helps you an upvote is appreciated.

If this reply helps you an upvote and "Accept as Solution" is appreciated.

View solution in original post

scelikok
SplunkTrust
SplunkTrust

Hi @karunagaraprabh ,

join command joins only first event on subsearch results that each main search result can join as default. You should use "max" parameter to match more results.

| join CustomerjobId type=left max=2

You can find more info about "max" parameter below;

https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/Join#Optional_arguments

 

If this reply helps you an upvote is appreciated.

If this reply helps you an upvote and "Accept as Solution" is appreciated.
Get Updates on the Splunk Community!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...