<?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 Joining two data sets using  time windows in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-data-sets-using-time-windows/m-p/163236#M46308</link>
    <description>&lt;P&gt;I have two data sets that I want to join:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Set A: _time, field1, field2, field3...&lt;BR /&gt;&lt;BR /&gt;
 via search: eventtype=mystats | fields _time, field1, field2, field3...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
Set B: _raw&lt;BR /&gt;&lt;BR /&gt;
 via search: eventype=mydata | tranaction .... | closed_txn = 0 | where _time &amp;gt;= "Set A _time - 5 seconds" AND _time &amp;lt;= "Set A _time + 5 seconds" | fields _raw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The result should be simply appending all Set B _raw that match to the rows of Set A.&lt;BR /&gt;&lt;BR /&gt;
Set A+B: _time, field1, field2, field3, _raw&lt;/P&gt;

&lt;P&gt;Is this possible with a subsearch to iterate over time or join by time while passing the _time around?  I am not sure what the right approach is but I am trying to find open transactions in set B around a window of events in Set A (which ticks every 30 seconds)&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:24:13 GMT</pubDate>
    <dc:creator>mmanfred</dc:creator>
    <dc:date>2020-09-28T15:24:13Z</dc:date>
    <item>
      <title>Joining two data sets using  time windows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-data-sets-using-time-windows/m-p/163236#M46308</link>
      <description>&lt;P&gt;I have two data sets that I want to join:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Set A: _time, field1, field2, field3...&lt;BR /&gt;&lt;BR /&gt;
 via search: eventtype=mystats | fields _time, field1, field2, field3...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
Set B: _raw&lt;BR /&gt;&lt;BR /&gt;
 via search: eventype=mydata | tranaction .... | closed_txn = 0 | where _time &amp;gt;= "Set A _time - 5 seconds" AND _time &amp;lt;= "Set A _time + 5 seconds" | fields _raw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The result should be simply appending all Set B _raw that match to the rows of Set A.&lt;BR /&gt;&lt;BR /&gt;
Set A+B: _time, field1, field2, field3, _raw&lt;/P&gt;

&lt;P&gt;Is this possible with a subsearch to iterate over time or join by time while passing the _time around?  I am not sure what the right approach is but I am trying to find open transactions in set B around a window of events in Set A (which ticks every 30 seconds)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:24:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-data-sets-using-time-windows/m-p/163236#M46308</guid>
      <dc:creator>mmanfred</dc:creator>
      <dc:date>2020-09-28T15:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two data sets using  time windows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-data-sets-using-time-windows/m-p/163237#M46309</link>
      <description>&lt;P&gt;eventtype=mystats | fields _time, field1, field2, field3 | join _time [ eventype=mydata | tranaction .... | closed_txn = 0 | where _time &amp;gt;= "Set A _time - 5 seconds" AND _time &amp;lt;= "Set A _time + 5 seconds" | fields _raw ]  &lt;/P&gt;

&lt;P&gt;May give you exactly what you are looking for.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:24:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-data-sets-using-time-windows/m-p/163237#M46309</guid>
      <dc:creator>davidpaper</dc:creator>
      <dc:date>2020-09-28T15:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two data sets using  time windows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-data-sets-using-time-windows/m-p/163238#M46310</link>
      <description>&lt;P&gt;This will join only when the timestamps are identical to the millisecond.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2013 06:32:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-data-sets-using-time-windows/m-p/163238#M46310</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-12-03T06:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two data sets using  time windows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-data-sets-using-time-windows/m-p/163239#M46311</link>
      <description>&lt;P&gt;agree with lguinn that it will match identically. I am looking for something that is more akin to a fuzzy match on the window.  If first event is 12:00:00 I need the joined events to be between 11:59:55 and 12:00:05 in this example.  (this is a one to many match and I would probably want to count the number of events as well with the results as a drill down later for example)&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2013 15:45:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-data-sets-using-time-windows/m-p/163239#M46311</guid>
      <dc:creator>mmanfred</dc:creator>
      <dc:date>2013-12-03T15:45:37Z</dc:date>
    </item>
  </channel>
</rss>

