<?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 Overwriting input field in lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Overwriting-input-field-in-lookup/m-p/16090#M2103</link>
    <description>&lt;P&gt;I have a question regarding lookup tables. I want to create a lookup that places the output in the same field as the input. &lt;/P&gt;

&lt;P&gt;Let's say I have the following lookup table defined:&lt;BR /&gt;
num,name&lt;BR /&gt;
80,http&lt;BR /&gt;
25,smtp  &lt;/P&gt;

&lt;P&gt;And the search returns a field named src_port with a value of 80.&lt;/P&gt;

&lt;P&gt;I want a search that replaces the content of src_port with http. If the lookup doesn't produce any results then the original contents should remain.&lt;/P&gt;

&lt;P&gt;This is what I've tried but it doesn't work. The result is that the field src_port is not available at all. 
 | lookup convert-portnum num AS src_port OUTPUT name AS src_port &lt;/P&gt;

&lt;P&gt;However, the same search using a different output field produces the expected result.
 | lookup convert-portnum num AS src_port OUTPUT name AS src_port_name&lt;/P&gt;

&lt;P&gt;Has anyone gotten something like this to work?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2010 22:04:45 GMT</pubDate>
    <dc:creator>izzy</dc:creator>
    <dc:date>2010-06-24T22:04:45Z</dc:date>
    <item>
      <title>Overwriting input field in lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Overwriting-input-field-in-lookup/m-p/16090#M2103</link>
      <description>&lt;P&gt;I have a question regarding lookup tables. I want to create a lookup that places the output in the same field as the input. &lt;/P&gt;

&lt;P&gt;Let's say I have the following lookup table defined:&lt;BR /&gt;
num,name&lt;BR /&gt;
80,http&lt;BR /&gt;
25,smtp  &lt;/P&gt;

&lt;P&gt;And the search returns a field named src_port with a value of 80.&lt;/P&gt;

&lt;P&gt;I want a search that replaces the content of src_port with http. If the lookup doesn't produce any results then the original contents should remain.&lt;/P&gt;

&lt;P&gt;This is what I've tried but it doesn't work. The result is that the field src_port is not available at all. 
 | lookup convert-portnum num AS src_port OUTPUT name AS src_port &lt;/P&gt;

&lt;P&gt;However, the same search using a different output field produces the expected result.
 | lookup convert-portnum num AS src_port OUTPUT name AS src_port_name&lt;/P&gt;

&lt;P&gt;Has anyone gotten something like this to work?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2010 22:04:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Overwriting-input-field-in-lookup/m-p/16090#M2103</guid>
      <dc:creator>izzy</dc:creator>
      <dc:date>2010-06-24T22:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting input field in lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Overwriting-input-field-in-lookup/m-p/16091#M2104</link>
      <description>&lt;P&gt;It is not possible to do this. You can rename or eval the field after the lookup instead.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2010 22:07:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Overwriting-input-field-in-lookup/m-p/16091#M2104</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-06-24T22:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting input field in lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Overwriting-input-field-in-lookup/m-p/16092#M2105</link>
      <description>&lt;P&gt;oh well, it would have been nice&lt;BR /&gt;
thanks for the reply&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2010 22:14:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Overwriting-input-field-in-lookup/m-p/16092#M2105</guid>
      <dc:creator>izzy</dc:creator>
      <dc:date>2010-06-24T22:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting input field in lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Overwriting-input-field-in-lookup/m-p/16093#M2106</link>
      <description>&lt;P&gt;Not sure when it was introduced, but you can now overwrite with a lookup:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.1/SearchReference/Lookup"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.1/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2016 15:33:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Overwriting-input-field-in-lookup/m-p/16093#M2106</guid>
      <dc:creator>niemesrw</dc:creator>
      <dc:date>2016-12-03T15:33:40Z</dc:date>
    </item>
  </channel>
</rss>

