<?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: Does outputlookup append or overwrite? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15725#M1975</link>
    <description>&lt;P&gt;It will overwrite. If you want to append, you should first do an &lt;CODE&gt;... | inputlookup append=true myoldfile&lt;/CODE&gt;, and then probably some kind of &lt;CODE&gt;dedup&lt;/CODE&gt; depending on the specifics of the lookup, then the &lt;CODE&gt;outputlookup myoldfile&lt;/CODE&gt;, e.g.,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;stats count by host,hostip | fields - count | inputlookup append=true hostiplookup | dedup host | outputlookup hostiplookup
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 18 Jun 2010 04:07:10 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2010-06-18T04:07:10Z</dc:date>
    <item>
      <title>Does outputlookup append or overwrite?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15723#M1973</link>
      <description>&lt;P&gt;Does the outputlookup command overwrite or append to the existing specified lookup file?  The documentation does not clarify: &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Outputlookup" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Outputlookup&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2010 03:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15723#M1973</guid>
      <dc:creator>hulahoop</dc:creator>
      <dc:date>2010-06-18T03:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Does outputlookup append or overwrite?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15724#M1974</link>
      <description>&lt;P&gt;It will overwrite. &lt;/P&gt;

&lt;P&gt;Because of this, the |outputlookup command is well suited to being used in scheduled saved searches, keeping a lookup table up to date with each run.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2010 03:36:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15724#M1974</guid>
      <dc:creator>jwestberg</dc:creator>
      <dc:date>2010-06-18T03:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Does outputlookup append or overwrite?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15725#M1975</link>
      <description>&lt;P&gt;It will overwrite. If you want to append, you should first do an &lt;CODE&gt;... | inputlookup append=true myoldfile&lt;/CODE&gt;, and then probably some kind of &lt;CODE&gt;dedup&lt;/CODE&gt; depending on the specifics of the lookup, then the &lt;CODE&gt;outputlookup myoldfile&lt;/CODE&gt;, e.g.,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;stats count by host,hostip | fields - count | inputlookup append=true hostiplookup | dedup host | outputlookup hostiplookup
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Jun 2010 04:07:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15725#M1975</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-06-18T04:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Does outputlookup append or overwrite?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15726#M1976</link>
      <description>&lt;P&gt;technically i guess this prepends, not appends, but that's more probably what you want anyway, especially if you're constructing a time-based lookup.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2010 04:08:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15726#M1976</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-06-18T04:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Does outputlookup append or overwrite?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15727#M1977</link>
      <description>&lt;P&gt;I'm not sure if you are aware of this issue(splunk 5), but when I've outputlookup with append=true, I wasn't managed to write more than 1198 new records. This solution make the append=true to be unnecessary and work around this bug. Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 30 Dec 2012 21:22:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15727#M1977</guid>
      <dc:creator>dadi</dc:creator>
      <dc:date>2012-12-30T21:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Does outputlookup append or overwrite?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15728#M1978</link>
      <description>&lt;P&gt;In splunk 6.x the above did not work until I change &lt;CODE&gt;| inputlookup x&lt;/CODE&gt; to &lt;CODE&gt;append [| inputlookup x]&lt;/CODE&gt;. To clarify, this is useful for cases where you want to append data to the csv file without making duplicate "keys". Without the extra &lt;CODE&gt;dedup&lt;/CODE&gt;, splunk will basically just open the file in append mode ( &lt;CODE&gt;'a'&lt;/CODE&gt; ) or write mode ( &lt;CODE&gt;'w'&lt;/CODE&gt; ).&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 16:13:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15728#M1978</guid>
      <dc:creator>bhawkins1</dc:creator>
      <dc:date>2016-11-08T16:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Does outputlookup append or overwrite?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15729#M1979</link>
      <description>&lt;P&gt;in my use cases it is better (safer) to export the results as csv (by hand, via the splunk results gui, top right download button)  and then use the AWESOME Lookup editor splunk app to manually copy / paste the data i want to append.  (i open the csv in excel to copy fields)&lt;/P&gt;

&lt;P&gt;granted this is not automated, but it keeps me from making errors or accidentally overwriting prior data in the lookup.&lt;/P&gt;

&lt;P&gt;app: &lt;A href="https://splunkbase.splunk.com/app/1724/"&gt;https://splunkbase.splunk.com/app/1724/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 15:35:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/15729#M1979</guid>
      <dc:creator>spunk311z</dc:creator>
      <dc:date>2020-02-17T15:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Does outputlookup append or overwrite?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/523564#M147661</link>
      <description>&lt;P&gt;i was searching for the similar issue and after reading this solution i assumed the current Splunk version also works similar to this solution. Then i was reading the docs and learnt the new options available, so i thought to update other readers who may face similar situation like myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Until Splunk 6.5, the scheduled reports never had "Write to a CSV lookup file" option. Ref:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.0/Report/Schedulereports" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.0/Report/Schedulereports&lt;/A&gt;&lt;/P&gt;&lt;P&gt;From Splunk 6.6,&amp;nbsp;the scheduled reports are having a "Write to a CSV lookup file" option. Ref:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.6.0/Report/Schedulereports#Define_a_Write_to_a_CSV_Lookup_File_action" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/6.6.0/Report/Schedulereports#Define_a_Write_to_a_CSV_Lookup_File_action&lt;/A&gt;&lt;/P&gt;&lt;P&gt;so, if we are using Splunk 6.6 or newer versions, then, simply with scheduled reports, we can "append" the lookup files. thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(PS - i have given around 500+ karma points so far, received badge for that, if an answer helped you, a karma point would be nice!. we all should start "Learn, Give Back, Have Fun")&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 01:44:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/523564#M147661</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-10-08T01:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Does outputlookup append or overwrite?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/530383#M149858</link>
      <description>&lt;P&gt;Are you guys sure of this method with tstats?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;| tstats count where (index=test* earliest="2/1/2020:00:00:00" latest="3/1/2020:00:00:00") BY _time span=1d&amp;nbsp;&lt;BR /&gt;| inputlookup append=true testlookup.cvs &lt;BR /&gt;| outputlookup testlookup.csv&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Nov 2020 07:34:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-outputlookup-append-or-overwrite/m-p/530383#M149858</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-11-23T07:34:35Z</dc:date>
    </item>
  </channel>
</rss>

