<?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 Earlier Joins with Later in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-Earlier-Joins-with-Later/m-p/431530#M123341</link>
    <description>&lt;P&gt;First group all events together, don't use joins.&lt;/P&gt;

&lt;P&gt;Pull transaction start and end, If you have these two events in different index OR sourcetypes, then append transaction start events to end using append command&lt;/P&gt;

&lt;P&gt;| transaction custID startswith="something which is in transction start events"  endwith="something which is in transction end events"&lt;/P&gt;

&lt;P&gt;go through Transaction command in Splunk doc, you get to know how to use this command&lt;/P&gt;</description>
    <pubDate>Sat, 08 Dec 2018 17:53:47 GMT</pubDate>
    <dc:creator>nagarjuna280</dc:creator>
    <dc:date>2018-12-08T17:53:47Z</dc:date>
    <item>
      <title>Join Earlier Joins with Later</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-Earlier-Joins-with-Later/m-p/431529#M123340</link>
      <description>&lt;P&gt;I'm doing a join where I want to only get subsearch events that happened before the parent search event.  Thus, I'm using:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;txnEnd | spath output=custID path=path | join custID [search txnStart | spath output=amount path=path] | table custID, amount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since &lt;CODE&gt;txnEnd&lt;/CODE&gt; comes after &lt;CODE&gt;txnStart&lt;/CODE&gt; , I'm using join's default &lt;CODE&gt;usetime=true earlier=true&lt;/CODE&gt;.  Whether or not I explicitly state these values, I am getting records on the table where &lt;CODE&gt;txnStart&lt;/CODE&gt; happens after &lt;CODE&gt;txnEnd&lt;/CODE&gt; (tested by getting the &lt;CODE&gt;_time&lt;/CODE&gt; of each event and displaying the difference between them).&lt;/P&gt;

&lt;P&gt;Why doesn't Splunk only join on the earlier events?  What can I do to make it so that &lt;CODE&gt;txnEnd&lt;/CODE&gt; will only join with events from &lt;CODE&gt;txnStart&lt;/CODE&gt; that happened before &lt;CODE&gt;txnEnd&lt;/CODE&gt; ?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Edit&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I thought I might mention that the same &lt;CODE&gt;custID&lt;/CODE&gt; applies to multiple &lt;CODE&gt;txnEnd&lt;/CODE&gt;s and multiple &lt;CODE&gt;txnStart&lt;/CODE&gt;s.  The two events do not have a unique ID that will tie them together, so I have to determine which &lt;CODE&gt;txnStart&lt;/CODE&gt; belongs to &lt;CODE&gt;txnEnd&lt;/CODE&gt; based off of which &lt;CODE&gt;txnStart&lt;/CODE&gt; with the same &lt;CODE&gt;custID&lt;/CODE&gt; happened the most recently before &lt;CODE&gt;txnEnd&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 23:03:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-Earlier-Joins-with-Later/m-p/431529#M123340</guid>
      <dc:creator>grex2595</dc:creator>
      <dc:date>2018-12-07T23:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Join Earlier Joins with Later</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-Earlier-Joins-with-Later/m-p/431530#M123341</link>
      <description>&lt;P&gt;First group all events together, don't use joins.&lt;/P&gt;

&lt;P&gt;Pull transaction start and end, If you have these two events in different index OR sourcetypes, then append transaction start events to end using append command&lt;/P&gt;

&lt;P&gt;| transaction custID startswith="something which is in transction start events"  endwith="something which is in transction end events"&lt;/P&gt;

&lt;P&gt;go through Transaction command in Splunk doc, you get to know how to use this command&lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 17:53:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-Earlier-Joins-with-Later/m-p/431530#M123341</guid>
      <dc:creator>nagarjuna280</dc:creator>
      <dc:date>2018-12-08T17:53:47Z</dc:date>
    </item>
  </channel>
</rss>

