<?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 rename extracted values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-extracted-values/m-p/490871#M137066</link>
    <description>&lt;P&gt;@sb01splunk,&lt;/P&gt;

&lt;P&gt;Add those conditions to the &lt;CODE&gt;case&lt;/CODE&gt; statement.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup combined.csv| search Code=* 
| eval NewArea=case(Area=="DEF","Opeth",Area=="GHI","Danzig",Code=="1234.1234","Gojira",match(Code,"8910"),"Tool") 
| table Code, NewArea
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 28 Sep 2019 01:12:19 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2019-09-28T01:12:19Z</dc:date>
    <item>
      <title>How to rename extracted values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-extracted-values/m-p/490869#M137064</link>
      <description>&lt;P&gt;I have the following data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Code        Area
1234.1234   ABC
9933.9933   DEF
6611.6611   GHI
8910.8910   ABC
8910.1111   ABC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search looks like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup combined.csv | search Code=* | eval NewArea=case('AREA'="DEF","Opeth",'AREA'="GHI","Danzig") | table Code, NewArea
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;New output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Code        Area
1234.1234   ABC
9933.9933   Opeth
6611.6611   Danzig
8910.8910   ABC
8910.1111   ABC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I also need to do, is if Code equals 8910.* rename it to "Tool" and if Code equals 1234.1234 rename it to "Gojira".&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Code        Area
1234.1234   Gojira
9933.9933   Opeth
6611.6611   Danzig
8910.8910   Tool
8910.1111   Tool
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is something like this possible?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 21:35:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-extracted-values/m-p/490869#M137064</guid>
      <dc:creator>sb01splunk</dc:creator>
      <dc:date>2019-09-27T21:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename extracted values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-extracted-values/m-p/490870#M137065</link>
      <description>&lt;P&gt;You're almost there with your existing query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup combined.csv | search Code=* 
| eval NewArea=case('AREA'="DEF","Opeth",'AREA'="GHI","Danzig", match(Code,"8910\..*"), "Tool", Code="1234.1234", "Gojira") 
| table Code, NewArea
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Sep 2019 01:05:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-extracted-values/m-p/490870#M137065</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-09-28T01:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename extracted values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-extracted-values/m-p/490871#M137066</link>
      <description>&lt;P&gt;@sb01splunk,&lt;/P&gt;

&lt;P&gt;Add those conditions to the &lt;CODE&gt;case&lt;/CODE&gt; statement.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup combined.csv| search Code=* 
| eval NewArea=case(Area=="DEF","Opeth",Area=="GHI","Danzig",Code=="1234.1234","Gojira",match(Code,"8910"),"Tool") 
| table Code, NewArea
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Sep 2019 01:12:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-extracted-values/m-p/490871#M137066</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-09-28T01:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename extracted values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-extracted-values/m-p/490872#M137067</link>
      <description>&lt;P&gt;Thanks a lot to both of you.  I wish I could put Accepted to both replies. &lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2019 02:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-extracted-values/m-p/490872#M137067</guid>
      <dc:creator>sb01splunk</dc:creator>
      <dc:date>2019-09-28T02:38:04Z</dc:date>
    </item>
  </channel>
</rss>

