<?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: how to get the first(_raw) when i have split my pattern which were  separated by pipe &amp;quot;|&amp;quot;  using eval and split command. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-first-raw-when-i-have-split-my-pattern-which-were/m-p/248150#M189185</link>
    <description>&lt;P&gt;See if this helps&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | makemv unique_exception delim="|" | mvexpand unique_exception | stats first(_raw) as first_occurrence by unique_exception
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 26 Aug 2016 13:59:41 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-08-26T13:59:41Z</dc:date>
    <item>
      <title>how to get the first(_raw) when i have split my pattern which were  separated by pipe "|"  using eval and split command.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-first-raw-when-i-have-split-my-pattern-which-were/m-p/248148#M189183</link>
      <description>&lt;P&gt;&lt;STRONG&gt;unique_exception= pattern1|pattern2|pattern3&lt;/STRONG&gt;&lt;BR /&gt;
all these three patterns(1,2,3) are tagged to unique number 111.&lt;BR /&gt;
&lt;STRONG&gt;eval temp=split(unique_exception, "|")|stats values(temp) by temp&lt;/STRONG&gt;&lt;BR /&gt;
i am getting output as follows&lt;BR /&gt;
&lt;STRONG&gt;111   -  pattern1&lt;/STRONG&gt;&lt;BR /&gt;
&lt;STRONG&gt;111   -  pattern2&lt;/STRONG&gt;&lt;BR /&gt;
&lt;STRONG&gt;111   -  pattern3&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;now how to get the first event for these individual events (pattern1 and pattern2 and pattern3) separately.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 13:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-first-raw-when-i-have-split-my-pattern-which-were/m-p/248148#M189183</guid>
      <dc:creator>annamareddi</dc:creator>
      <dc:date>2016-08-26T13:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the first(_raw) when i have split my pattern which were  separated by pipe "|"  using eval and split command.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-first-raw-when-i-have-split-my-pattern-which-were/m-p/248149#M189184</link>
      <description>&lt;P&gt;Please check this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval temp=split(unique_exception, "|")|stats first(_time) as _time values(temp) by temp 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There is a good reference for Functions for stats in the docs. - &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commonstatsfunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commonstatsfunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 13:51:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-first-raw-when-i-have-split-my-pattern-which-were/m-p/248149#M189184</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-08-26T13:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the first(_raw) when i have split my pattern which were  separated by pipe "|"  using eval and split command.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-first-raw-when-i-have-split-my-pattern-which-were/m-p/248150#M189185</link>
      <description>&lt;P&gt;See if this helps&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | makemv unique_exception delim="|" | mvexpand unique_exception | stats first(_raw) as first_occurrence by unique_exception
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Aug 2016 13:59:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-first-raw-when-i-have-split-my-pattern-which-were/m-p/248150#M189185</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-26T13:59:41Z</dc:date>
    </item>
  </channel>
</rss>

