<?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 Is this what a full outer join looks like in Splunk ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99368#M25635</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I am trying to do a full outer join on banklog and creditunionlog such that I can &lt;STRONG&gt;find the timestamp difference between the earliest and last account transaction&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype="banklog") OR (sourcetype="creditunionlog" )  | rename BankAccountNo As Acct | rename CreditUnionAccountNo As Acct | stats range(_time) by Acct
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works like a charm.&lt;/P&gt;

&lt;P&gt;Except when I try to add an account number filter like such, IT DOESNT ACTUALLY WORK (!?!?!??!!)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype="banklog") OR (sourcetype="creditunionlog" )  | rename BankAccountNo As Acct | rename CreditUnionAccountNo As Acct | search Acct=1 OR Acct=2 | stats range(_time) by Acct
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Anybody else know how a full outerjoin ought to be done in a situation like this ? &lt;/P&gt;

&lt;P&gt;Just to state my point, I am getting the results I need, I just need to narrow it down to a few accounts (I have 10000+ accounts per day &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; )&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jan 2013 06:25:46 GMT</pubDate>
    <dc:creator>asarolkar</dc:creator>
    <dc:date>2013-01-25T06:25:46Z</dc:date>
    <item>
      <title>Is this what a full outer join looks like in Splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99368#M25635</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I am trying to do a full outer join on banklog and creditunionlog such that I can &lt;STRONG&gt;find the timestamp difference between the earliest and last account transaction&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype="banklog") OR (sourcetype="creditunionlog" )  | rename BankAccountNo As Acct | rename CreditUnionAccountNo As Acct | stats range(_time) by Acct
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works like a charm.&lt;/P&gt;

&lt;P&gt;Except when I try to add an account number filter like such, IT DOESNT ACTUALLY WORK (!?!?!??!!)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype="banklog") OR (sourcetype="creditunionlog" )  | rename BankAccountNo As Acct | rename CreditUnionAccountNo As Acct | search Acct=1 OR Acct=2 | stats range(_time) by Acct
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Anybody else know how a full outerjoin ought to be done in a situation like this ? &lt;/P&gt;

&lt;P&gt;Just to state my point, I am getting the results I need, I just need to narrow it down to a few accounts (I have 10000+ accounts per day &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; )&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2013 06:25:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99368#M25635</guid>
      <dc:creator>asarolkar</dc:creator>
      <dc:date>2013-01-25T06:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is this what a full outer join looks like in Splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99369#M25636</link>
      <description>&lt;P&gt;Does this search work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype="banklog" (BankAccountNo=1 OR BankAccountNo=2)) OR (sourcetype="creditunionlog" (CreditUnionAccountNo=1 OR CreditUnionAccountNo=2)) | rename BankAccountNo As Acct | rename CreditUnionAccountNo As Acct | stats range(_time) by Acct
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Jan 2013 11:10:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99369#M25636</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2013-01-26T11:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is this what a full outer join looks like in Splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99370#M25637</link>
      <description>&lt;P&gt;What exactly doesn't work; does it not return any results, does it only return results from one sourcetype...&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jan 2013 17:03:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99370#M25637</guid>
      <dc:creator>rtadams89</dc:creator>
      <dc:date>2013-01-26T17:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is this what a full outer join looks like in Splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99371#M25638</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype="banklog") OR (sourcetype="creditunionlog" )  | eval Acct=coalesce(BankAccountNo,CreditUnionAccountNo) | search Acct=1 OR Acct=2 | stats range(_time) by Acct
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Jan 2013 17:05:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99371#M25638</guid>
      <dc:creator>rtadams89</dc:creator>
      <dc:date>2013-01-26T17:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is this what a full outer join looks like in Splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99372#M25639</link>
      <description>&lt;P&gt;worked out well !&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jan 2013 18:50:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99372#M25639</guid>
      <dc:creator>asarolkar</dc:creator>
      <dc:date>2013-01-26T18:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is this what a full outer join looks like in Splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99373#M25640</link>
      <description>&lt;P&gt;Splunk does not actually support full outer joins with &lt;CODE&gt;join&lt;/CODE&gt;.  &lt;CODE&gt;join type=outer&lt;/CODE&gt; is equivalent to &lt;CODE&gt;join type=left&lt;/CODE&gt;.  I've been approximating full outer joins with &lt;CODE&gt;append&lt;/CODE&gt; followed by &lt;CODE&gt;stats first(...)&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=st_1 search_field_1=key_1 search_field_2=key_2 | append [ sourcetype=st_2 search_field_1=key_1 search_field_2=key_2 ] | stats first(output_field_1) as output_field_1 first(output_field_2) as output_field_2 by search_field_1 search_field_2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That works fine as long as you are looking for at most one result from either side of the "join" and the two searches will not return conflicting values.  Its possible this works for me in this form specifically because in my case each output field will either be null or populated at most once per key set.&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2015 13:44:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-this-what-a-full-outer-join-looks-like-in-Splunk/m-p/99373#M25640</guid>
      <dc:creator>mikebd</dc:creator>
      <dc:date>2015-05-19T13:44:00Z</dc:date>
    </item>
  </channel>
</rss>

