<?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 extract unique values from events with multiple values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-unique-values-from-events-with-multiple-values/m-p/243411#M72440</link>
    <description>&lt;P&gt;Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search here | extract pairdelim="," kvdelim="=" | eval {message}=varValue | table _time Tower Platform City SessionID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 Aug 2016 01:29:20 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-08-24T01:29:20Z</dc:date>
    <item>
      <title>How to extract unique values from events with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-unique-values-from-events-with-multiple-values/m-p/243408#M72437</link>
      <description>&lt;P&gt;I am importing SQL data into Splunk.&lt;BR /&gt;
Each record contains &lt;STRONG&gt;SessionID&lt;/STRONG&gt;, &lt;STRONG&gt;message&lt;/STRONG&gt;, and &lt;STRONG&gt;VarValue&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;SessionID is always unique, but message and VarValue contain different values&lt;/P&gt;

&lt;P&gt;Example&lt;/P&gt;

&lt;P&gt;Sessionid = 1234,message="Tower", varValue="site1"&lt;BR /&gt;
SessionID = 1234,message="Platform",varValue="Wireless"&lt;BR /&gt;
SessionID = 1234,message="City",varValue="mytown"&lt;/P&gt;

&lt;P&gt;Sessionid = 2222,message="Tower", varValue="site2"&lt;BR /&gt;
SessionID = 2222,message="Platform",varValue="Satellite"&lt;BR /&gt;
SessionID = 2222,message="City",varValue="mytown"&lt;/P&gt;

&lt;P&gt;How can I extract the unique message and varValue into separate variables per unique SessionID?&lt;/P&gt;

&lt;P&gt;What I would like to do is display the Platform and City within a single search&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 19:32:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-unique-values-from-events-with-multiple-values/m-p/243408#M72437</guid>
      <dc:creator>ipops</dc:creator>
      <dc:date>2016-08-23T19:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract unique values from events with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-unique-values-from-events-with-multiple-values/m-p/243409#M72438</link>
      <description>&lt;P&gt;If the data is already in Splunk, and the three fields have been extracted, see if this works (may need some tweaking)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search here | eval {message}=varValue | stats values(Tower)  as Tower values(Platform) as Platform values(City) as City by SessionID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the fields are not extracted, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search here | extract pairdelim="," kvdelim="=" | eval {message}=varValue | stats values(Tower)  as Tower values(Platform) as Platform values(City) as City by SessionID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Aug 2016 19:53:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-unique-values-from-events-with-multiple-values/m-p/243409#M72438</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-23T19:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract unique values from events with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-unique-values-from-events-with-multiple-values/m-p/243410#M72439</link>
      <description>&lt;P&gt;That worked.  Thanks alot!&lt;/P&gt;

&lt;P&gt;Only thing is no timestamps are shown when I do the following.  Any ideas how to get timestamps?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search here | extract pairdelim="," kvdelim="=" | eval {message}=varValue | stats values(Tower)  as Tower values(Platform) as Platform values(City) as City by SessionID | table _time Tower Platform City SessionID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Aug 2016 20:35:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-unique-values-from-events-with-multiple-values/m-p/243410#M72439</guid>
      <dc:creator>ipops</dc:creator>
      <dc:date>2016-08-23T20:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract unique values from events with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-unique-values-from-events-with-multiple-values/m-p/243411#M72440</link>
      <description>&lt;P&gt;Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search here | extract pairdelim="," kvdelim="=" | eval {message}=varValue | table _time Tower Platform City SessionID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Aug 2016 01:29:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-unique-values-from-events-with-multiple-values/m-p/243411#M72440</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-24T01:29:20Z</dc:date>
    </item>
  </channel>
</rss>

