<?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 Searching most recent events with the same _time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Searching-most-recent-events-with-the-same-time/m-p/69420#M14072</link>
    <description>&lt;P&gt;Ok we are currently receiving two sets of data a preliminary version (received first) and a finalised version (received later). Both sets of data are identical and have the same _time values after import into the same sourcetype.&lt;/P&gt;

&lt;P&gt;When performing calculations we only want to get the most recent value for that time.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Prelim data&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;UID, In Date, Update Time, Vol, Corr Vol
453,May 1 2012 6:00AM,May 2 2012 3:24PM,133,223.000000000
453,May 1 2012 7:00AM,May 2 2012 3:24PM,104,175.000000000
453,May 1 2012 8:00AM,May 2 2012 3:24PM,90,152.000000000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Final data&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;UID, In Date, Update Time, Vol, Corr Vol
453,May 1 2012 6:00AM,May 2 2012 3:24PM,140,223.000000000
453,May 1 2012 7:00AM,May 2 2012 3:24PM,110,175.000000000
453,May 1 2012 8:00AM,May 2 2012 3:24PM,93,152.000000000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I know I can use the search and it will get the most recent version&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="Flow" UID=452 | dedup _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now while this works it is undocumented and we would hate for such a 'feature' to be changed and then break the Splunk app we are developing.&lt;/P&gt;

&lt;P&gt;Can someone confirm this is the only way to achieve this or is there a better way?&lt;/P&gt;</description>
    <pubDate>Tue, 25 Sep 2012 06:06:10 GMT</pubDate>
    <dc:creator>phoenixdigital</dc:creator>
    <dc:date>2012-09-25T06:06:10Z</dc:date>
    <item>
      <title>Searching most recent events with the same _time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Searching-most-recent-events-with-the-same-time/m-p/69420#M14072</link>
      <description>&lt;P&gt;Ok we are currently receiving two sets of data a preliminary version (received first) and a finalised version (received later). Both sets of data are identical and have the same _time values after import into the same sourcetype.&lt;/P&gt;

&lt;P&gt;When performing calculations we only want to get the most recent value for that time.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Prelim data&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;UID, In Date, Update Time, Vol, Corr Vol
453,May 1 2012 6:00AM,May 2 2012 3:24PM,133,223.000000000
453,May 1 2012 7:00AM,May 2 2012 3:24PM,104,175.000000000
453,May 1 2012 8:00AM,May 2 2012 3:24PM,90,152.000000000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Final data&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;UID, In Date, Update Time, Vol, Corr Vol
453,May 1 2012 6:00AM,May 2 2012 3:24PM,140,223.000000000
453,May 1 2012 7:00AM,May 2 2012 3:24PM,110,175.000000000
453,May 1 2012 8:00AM,May 2 2012 3:24PM,93,152.000000000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I know I can use the search and it will get the most recent version&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="Flow" UID=452 | dedup _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now while this works it is undocumented and we would hate for such a 'feature' to be changed and then break the Splunk app we are developing.&lt;/P&gt;

&lt;P&gt;Can someone confirm this is the only way to achieve this or is there a better way?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 06:06:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Searching-most-recent-events-with-the-same-time/m-p/69420#M14072</guid>
      <dc:creator>phoenixdigital</dc:creator>
      <dc:date>2012-09-25T06:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Searching most recent events with the same _time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Searching-most-recent-events-with-the-same-time/m-p/69421#M14073</link>
      <description>&lt;P&gt;What is undocumented? &lt;CODE&gt;dedup _time&lt;/CODE&gt;? While I guess that PARTICULAR usage example for &lt;CODE&gt;dedup&lt;/CODE&gt; might not be explicitly stated in the docs, both the &lt;CODE&gt;dedup&lt;/CODE&gt; command and the &lt;CODE&gt;_time&lt;/CODE&gt; field are definitely not going anywhere soon.&lt;/P&gt;

&lt;P&gt;But, I don't know if there's any guarantee that given two events with identical timestamp, Splunk is going to choose the newest one. I would consider differentiating the events using the field it would check anyway to see which event is newer - &lt;CODE&gt;_indextime&lt;/CODE&gt;, which is what it says...a field containing the time (in epoch format) when Splunk indexed an event.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 06:20:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Searching-most-recent-events-with-the-same-time/m-p/69421#M14073</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-09-25T06:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Searching most recent events with the same _time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Searching-most-recent-events-with-the-same-time/m-p/69422#M14074</link>
      <description>&lt;P&gt;Thankyou _indextime would be perfect.&lt;/P&gt;

&lt;P&gt;I wasn't thinking dedup was undocumented or would go away but more that the way it behaved with _time might change. That was the undocumented part I was referring to.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="Flow" UID = 453 | dedup _time sortby -_indextime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will give consistent results.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 06:30:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Searching-most-recent-events-with-the-same-time/m-p/69422#M14074</guid>
      <dc:creator>phoenixdigital</dc:creator>
      <dc:date>2012-09-25T06:30:54Z</dc:date>
    </item>
  </channel>
</rss>

