<?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 Left join not returning values as expected. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Left-join-not-returning-values-as-expected/m-p/675617#M231148</link>
    <description>&lt;P&gt;I am joining two splunk query to capture the&amp;nbsp; values which is not present in subquery.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to find the account which opend today but not posted. But quary not retuning any values.&lt;/P&gt;&lt;P&gt;Let me know if we have other way to get the values ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query 1 :&amp;nbsp; Returns Account opened today.&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=a&amp;nbsp; "digital account opened" | rename msg.requestID AccountID | table&amp;nbsp;AccountID&lt;/P&gt;&lt;P&gt;Query 2 : Account posted today.&lt;/P&gt;&lt;P&gt;index=b "/api/posted" 200&amp;nbsp; | rex "GET /api/posted (?&amp;lt;accountID&amp;gt;\d+) HTTP 1.1" table AccountID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Final Query :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;index=a&amp;nbsp; "digital account opened" | rename msg.requestID AccountID | table&amp;nbsp;AccountID&lt;/P&gt;&lt;P&gt;&amp;nbsp;| join type=left&amp;nbsp;&amp;nbsp;AccountIDOpened [ search index=b "/api/posted" 200&amp;nbsp; | rex "GET /api/posted (?&amp;lt;accountID&amp;gt;\d+) HTTP 1.1" table AccountID ] | search AccountIDOpened =null | table _time,AccountIDOpened&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Jan 2024 23:40:59 GMT</pubDate>
    <dc:creator>yuvrajsharma_13</dc:creator>
    <dc:date>2024-01-27T23:40:59Z</dc:date>
    <item>
      <title>Left join not returning values as expected.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Left-join-not-returning-values-as-expected/m-p/675617#M231148</link>
      <description>&lt;P&gt;I am joining two splunk query to capture the&amp;nbsp; values which is not present in subquery.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to find the account which opend today but not posted. But quary not retuning any values.&lt;/P&gt;&lt;P&gt;Let me know if we have other way to get the values ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query 1 :&amp;nbsp; Returns Account opened today.&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=a&amp;nbsp; "digital account opened" | rename msg.requestID AccountID | table&amp;nbsp;AccountID&lt;/P&gt;&lt;P&gt;Query 2 : Account posted today.&lt;/P&gt;&lt;P&gt;index=b "/api/posted" 200&amp;nbsp; | rex "GET /api/posted (?&amp;lt;accountID&amp;gt;\d+) HTTP 1.1" table AccountID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Final Query :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;index=a&amp;nbsp; "digital account opened" | rename msg.requestID AccountID | table&amp;nbsp;AccountID&lt;/P&gt;&lt;P&gt;&amp;nbsp;| join type=left&amp;nbsp;&amp;nbsp;AccountIDOpened [ search index=b "/api/posted" 200&amp;nbsp; | rex "GET /api/posted (?&amp;lt;accountID&amp;gt;\d+) HTTP 1.1" table AccountID ] | search AccountIDOpened =null | table _time,AccountIDOpened&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2024 23:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Left-join-not-returning-values-as-expected/m-p/675617#M231148</guid>
      <dc:creator>yuvrajsharma_13</dc:creator>
      <dc:date>2024-01-27T23:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Left join not returning values as expected.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Left-join-not-returning-values-as-expected/m-p/675618#M231149</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2024 23:42:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Left-join-not-returning-values-as-expected/m-p/675618#M231149</guid>
      <dc:creator>yuvrajsharma_13</dc:creator>
      <dc:date>2024-01-27T23:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Left join not returning values as expected.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Left-join-not-returning-values-as-expected/m-p/675622#M231150</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260091"&gt;@yuvrajsharma_13&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You're attempting to join both searches by a field named AccountIDOpened, which neither search includes.&lt;/P&gt;&lt;P&gt;Are you trying to return all results in the outer/left search that are not present in the inner/right search or vice versa?&lt;/P&gt;&lt;P&gt;Based on your description, you can find accounts that were opened but not posted by searching for opened account and excluding accounts that were posted using a subsearch:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;index=a "digital account opened" NOT 
    [ search index=b "/api/posted" 200 
    | rex "GET /api/posted (?&amp;lt;requestID&amp;gt;\d+) HTTP 1.1" 
    | rename AccountID as msg.requestID
    | table msg.requestID ]&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 28 Jan 2024 00:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Left-join-not-returning-values-as-expected/m-p/675622#M231150</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2024-01-28T00:58:09Z</dc:date>
    </item>
  </channel>
</rss>

