<?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: last dataset  from all events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556314#M157975</link>
    <description>&lt;P&gt;SPL is not SQL - SPL works on a pipeline of events being processed and passed on to the next step in the process. If it helps, think of it like a bash script&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cat file | grep "value" | sort&lt;/LI-CODE&gt;&lt;P&gt;Each command passes the results through stdout to the stdin of the next command and only the data in that stdout/stdin pipe gets passed&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jun 2021 08:39:49 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-06-18T08:39:49Z</dc:date>
    <item>
      <title>last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556274#M157963</link>
      <description>&lt;P&gt;Hello im newbie with Splunk search&lt;/P&gt;&lt;P&gt;Can you please help me&lt;/P&gt;&lt;P&gt;I have HF request which return:&lt;/P&gt;&lt;P&gt;-AAA&amp;nbsp; datetime_of_change&lt;/P&gt;&lt;P&gt;-BBB datetime_of_change&lt;/P&gt;&lt;P&gt;Every halfhour i get the same dataset from DB to INDEX&lt;/P&gt;&lt;P&gt;I have to get latest dataset (not latest row!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 05:34:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556274#M157963</guid>
      <dc:creator>alexeysharkov</dc:creator>
      <dc:date>2021-06-18T05:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556291#M157966</link>
      <description>&lt;P&gt;Splunk works on being told what the data in the events looks like - the community works in a similar way. If you give us more information about the data you have in your events, it is easier for us to suggest solutions.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 07:14:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556291#M157966</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-18T07:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556297#M157967</link>
      <description>&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;Snapshot 1 from DB&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;Event _1&amp;nbsp; DATA=AAA CHGDATE=16.06.2021 11:03&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;Event _2&amp;nbsp;DATA=BBB CHGDATE=16.06.2021 11:04&lt;/P&gt;&lt;P&gt;Snapshot 2 from db&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;Event _3&amp;nbsp; DATA=AAA CHGDATE=17.06.2021 11:03&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;Event _4 DATA=BBB CHGDATE=17.06.2021 11:04&lt;/P&gt;&lt;P class="lia-align-left"&gt;Snapshot 3 from db&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;Event _5&amp;nbsp; DATA=AAA CHGDATE=17.06.2021 15:03&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;Event _6 DATA=BBB CHGDATE=17.06.2021 15:04&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;STRONG&gt;I have to get last snapshot data. That's :&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Snapshot 3 from db&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;Event _5&amp;nbsp; DATA=AAA CHGDATE=17.06.2021 15:03&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;Event_6 DATA=BBB CHGDATE=17.06.2021 15:04&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 07:36:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556297#M157967</guid>
      <dc:creator>alexeysharkov</dc:creator>
      <dc:date>2021-06-18T07:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556300#M157969</link>
      <description>&lt;P&gt;Try something like this (assumes CHGDATE is an epoch datetime, otherwise use strptime to parse the string to get an epoch datetime)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval _time=CHGDATE
| stats latest(*) as * by DATA&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Jun 2021 07:43:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556300#M157969</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-18T07:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556303#M157970</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14690i1E21C4601CFFFA69/image-size/large?v=v2&amp;amp;px=999" role="button" title="x.PNG" alt="x.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 07:50:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556303#M157970</guid>
      <dc:creator>alexeysharkov</dc:creator>
      <dc:date>2021-06-18T07:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556304#M157971</link>
      <description>&lt;P&gt;Just like in SQL Style:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select * from&amp;nbsp;splunk_log where&amp;nbsp;_time=&lt;/P&gt;&lt;P&gt;(select max(_time) from splunk_log)&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 07:59:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556304#M157971</guid>
      <dc:creator>alexeysharkov</dc:creator>
      <dc:date>2021-06-18T07:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556306#M157972</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval _time=strptime(CHGDATE,"%Y-%m-%d %H:%M:%S.%Q")
| stats latest(*) as * by DATA&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Jun 2021 08:08:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556306#M157972</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-18T08:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556308#M157973</link>
      <description>&lt;P&gt;It work fine , but how to get&amp;nbsp;&lt;/P&gt;&lt;P&gt;in result: DATA,CHGDATE&lt;/P&gt;&lt;P&gt;sorry it very very difficult for me&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 08:24:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556308#M157973</guid>
      <dc:creator>alexeysharkov</dc:creator>
      <dc:date>2021-06-18T08:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556311#M157974</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval _time=strptime(CHGDATE,"%Y-%m-%d %H:%M:%S.%Q")
| stats latest(*) as * by DATA
| table DATA CHGDATE&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Jun 2021 08:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556311#M157974</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-18T08:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: last dataset  from all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556314#M157975</link>
      <description>&lt;P&gt;SPL is not SQL - SPL works on a pipeline of events being processed and passed on to the next step in the process. If it helps, think of it like a bash script&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cat file | grep "value" | sort&lt;/LI-CODE&gt;&lt;P&gt;Each command passes the results through stdout to the stdin of the next command and only the data in that stdout/stdin pipe gets passed&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 08:39:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/last-dataset-from-all-events/m-p/556314#M157975</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-18T08:39:49Z</dc:date>
    </item>
  </channel>
</rss>

