<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Join with subsearch doesn't gives me expected results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240047#M71347</link>
    <description>&lt;P&gt;Mr. Woodcock,&lt;BR /&gt;
One more help from you.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Audit Logs:&lt;/STRONG&gt;&lt;BR /&gt;
2016-06-12 00:48:29,834 INFO  [MainThread][PID:3143] item: AR001SJFBS valid_audio_path: /PROXY_AUDIO/2011/05/31/AR001SJFBS_3.mp2||/stornext/MAM_LOWRES_5/PROXY_AUDIO/2011/05/31/AR001SJFBS_4.mp2&lt;BR /&gt;
2016-06-12 00:48:29,834 INFO  [MainThread][PID:3143] Item Submitted :: AR001SJFBS&lt;BR /&gt;
2016-06-12 00:48:40,730 INFO  [MainThread][PID:3143] Item Processed :: AR001SJFBS, Transcode Status :: error&lt;/P&gt;

&lt;P&gt;2016-06-27 08:30:20,169 INFO  [MainThread][PID:29112] item: AR001SJFBS valid_audio_path: /PROXY_AUDIO/2011/05/31/AR001SJFBS_3.mp2||/stornext/MAM_LOWRES_5/PROXY_AUDIO/2011/05/31/AR001SJFBS_4.mp2&lt;BR /&gt;
2016-06-27 08:30:20,169 INFO  [MainThread][PID:29112] Item Submitted :: AR001SJFBS&lt;BR /&gt;
2016-06-27 08:51:56,680 INFO  [MainThread][PID:29112] update metadat:: file system check True, new access path L:\PROXY\2011\05\31\AR001SJFBS.mp4&lt;BR /&gt;
2016-06-27 08:52:13,879 INFO  [MainThread][PID:29112] Existing proxy backup at P:\MPEG_Backup\PROXY\2011\05\31\AR001SJFBS.mpeg ::&lt;BR /&gt;
2016-06-27 08:52:13,879 INFO  [MainThread][PID:29112] Item Processed :: AR001SJFBS, Transcode Status :: completed &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Question, from the above log&lt;/STRONG&gt;&lt;BR /&gt;
I'm re-submitting jobs those are failed with error/aborted/failed status. So possibilities of repeated proxies present in the list.&lt;BR /&gt;
I've to treat the transcode status of "AR001SJFBS" as "completed" instead "error" since completed is the latest status.&lt;/P&gt;

&lt;P&gt;Thanks, Arul&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 10:10:29 GMT</pubDate>
    <dc:creator>arulbalans</dc:creator>
    <dc:date>2020-09-29T10:10:29Z</dc:date>
    <item>
      <title>Join with subsearch doesn't gives me expected results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240044#M71344</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Query1-Results:&lt;/STRONG&gt; &lt;BR /&gt;
ProxiesProcessed,Status&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Query2-Results:&lt;/STRONG&gt; &lt;BR /&gt;
ProxiesProcessed,Audio_Tracks,year_mm_dd&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Join Query:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index1 
host=node1 
source="results.log" 
"item: " AND "valid_audio_path: " |eval ProxiesProcessed=trim(substr(_raw,101,11)) | dedup ProxiesProcessed |rename ProxiesProcessed as P_ProxiesProcessed 
|eval Audio_Tracks = trim(substr(_raw,130,len(_raw)-129)) 
|eval year_mm_dd = trim(substr(Audio_Tracks,36,07)) 
|fields P_ProxiesProcessed,Audio_Tracks,year_mm_dd
|join type=left max=0 P_ProxiesProcessed 
[search index=index1 host=node1 source="results.log" 
"Item Processed :: " 
|eval ProxiesProcessed=trim(substr(_raw,112,10)) 
|eval Status=trim(substr(_raw,144,len(_raw)-143)) 
|dedup ProxiesProcessed 
|where Status="already_transcoded" 
|fields ProxiesProcessed,Status 
|rename ProxiesProcessed  as P_ProxiesProcessed 
|rename Status  as S_Status ]
|table P_ProxiesProcessed,Audio_Tracks,year_mm_dd,S_Status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm trying to join with the &lt;STRONG&gt;ProxiesProcessed&lt;/STRONG&gt; field to get matching results with Query1 &amp;amp; Query2&lt;/P&gt;

&lt;P&gt;If I execute the Query1 (used in subsearch) separately, gives me 300 events matched.&lt;/P&gt;

&lt;P&gt;If I execute the Query2 (used in outer search) separately, gives me 20k events matched.&lt;/P&gt;

&lt;P&gt;Any help is really appreciated.&lt;/P&gt;

&lt;P&gt;Thanks, Arul&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240044#M71344</guid>
      <dc:creator>arulbalans</dc:creator>
      <dc:date>2020-09-29T10:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Join with subsearch doesn't gives me expected results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240045#M71345</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index1 host=node1 source="results.log" (("item: " AND "valid_audio_path: ") OR ( "Item Processed :: "))
| eval type=if(searchmatch("item: "), "Left", "Right")
| eval ProxiesProcessed=if((type="Left"), trim(substr(_raw,101,11)), trim(substr(_raw,112,10)))
| eval Status=if((type="Right"), trim(substr(_raw,144,len(_raw)-143), Status) 
| dedup ProxiesProcessed type
| search type="Left" OR Status="already_transcoded"
| rename ProxiesProcessed AS P_ProxiesProcessed 
| eval Audio_Tracks =if((type="Right"), trim(substr(_raw,130,len(_raw)-129)), Audio_Tracks)
| eval year_mm_dd =if((type="Right"), trim(substr(Audio_Tracks,36,07)), year_mm_dd)
| fields P_ProxiesProcessed Status Audio_Tracks year_mm_dd
| stats dc(type) AS numTypes values(*) AS * BY P_ProxiesProcessed
| rename Status AS S_Status
| table P_ProxiesProcessed Audio_Tracks year_mm_dd S_Status numTypes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives the fully merged set (full join). For each function, tack on the appropriate remaining search string:&lt;/P&gt;

&lt;P&gt;For Left Join:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search type="Left"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For right join:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search type="Right"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For XOR (outer join):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search numTypes= 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For inner join:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search numTypes&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jun 2016 15:39:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240045#M71345</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-29T15:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Join with subsearch doesn't gives me expected results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240046#M71346</link>
      <description>&lt;P&gt;Mr. Woodcock, &lt;BR /&gt;
It works to me.&lt;BR /&gt;
I appreciate your help on this part, Thank you so much.&lt;/P&gt;

&lt;P&gt;Thanks, Arul&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2016 22:04:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240046#M71346</guid>
      <dc:creator>arulbalans</dc:creator>
      <dc:date>2016-07-05T22:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Join with subsearch doesn't gives me expected results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240047#M71347</link>
      <description>&lt;P&gt;Mr. Woodcock,&lt;BR /&gt;
One more help from you.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Audit Logs:&lt;/STRONG&gt;&lt;BR /&gt;
2016-06-12 00:48:29,834 INFO  [MainThread][PID:3143] item: AR001SJFBS valid_audio_path: /PROXY_AUDIO/2011/05/31/AR001SJFBS_3.mp2||/stornext/MAM_LOWRES_5/PROXY_AUDIO/2011/05/31/AR001SJFBS_4.mp2&lt;BR /&gt;
2016-06-12 00:48:29,834 INFO  [MainThread][PID:3143] Item Submitted :: AR001SJFBS&lt;BR /&gt;
2016-06-12 00:48:40,730 INFO  [MainThread][PID:3143] Item Processed :: AR001SJFBS, Transcode Status :: error&lt;/P&gt;

&lt;P&gt;2016-06-27 08:30:20,169 INFO  [MainThread][PID:29112] item: AR001SJFBS valid_audio_path: /PROXY_AUDIO/2011/05/31/AR001SJFBS_3.mp2||/stornext/MAM_LOWRES_5/PROXY_AUDIO/2011/05/31/AR001SJFBS_4.mp2&lt;BR /&gt;
2016-06-27 08:30:20,169 INFO  [MainThread][PID:29112] Item Submitted :: AR001SJFBS&lt;BR /&gt;
2016-06-27 08:51:56,680 INFO  [MainThread][PID:29112] update metadat:: file system check True, new access path L:\PROXY\2011\05\31\AR001SJFBS.mp4&lt;BR /&gt;
2016-06-27 08:52:13,879 INFO  [MainThread][PID:29112] Existing proxy backup at P:\MPEG_Backup\PROXY\2011\05\31\AR001SJFBS.mpeg ::&lt;BR /&gt;
2016-06-27 08:52:13,879 INFO  [MainThread][PID:29112] Item Processed :: AR001SJFBS, Transcode Status :: completed &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Question, from the above log&lt;/STRONG&gt;&lt;BR /&gt;
I'm re-submitting jobs those are failed with error/aborted/failed status. So possibilities of repeated proxies present in the list.&lt;BR /&gt;
I've to treat the transcode status of "AR001SJFBS" as "completed" instead "error" since completed is the latest status.&lt;/P&gt;

&lt;P&gt;Thanks, Arul&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240047#M71347</guid>
      <dc:creator>arulbalans</dc:creator>
      <dc:date>2020-09-29T10:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Join with subsearch doesn't gives me expected results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240048#M71348</link>
      <description>&lt;P&gt;I do not understand.  It would probably be best to start over and ask a new question but be sure to be as specific as possible.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jul 2016 00:05:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240048#M71348</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-09T00:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Join with subsearch doesn't gives me expected results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240049#M71349</link>
      <description>&lt;P&gt;Yup, the same question I posted here: &lt;A href="https://answers.splunk.com/answers/427007/get-the-latest-event-status-of-the-jobsre-submitte.html"&gt;https://answers.splunk.com/answers/427007/get-the-latest-event-status-of-the-jobsre-submitte.html&lt;/A&gt;, thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 21:01:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-with-subsearch-doesn-t-gives-me-expected-results/m-p/240049#M71349</guid>
      <dc:creator>arulbalans</dc:creator>
      <dc:date>2016-07-12T21:01:47Z</dc:date>
    </item>
  </channel>
</rss>

