<?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 do you append new results in a lookup file? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-append-new-results-in-a-lookup-file/m-p/347482#M102916</link>
    <description>&lt;P&gt;Hi @chanthongphiob,&lt;BR /&gt;
Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main NOT [ | inputlookup baseline.csv ] | table Account_Name Host| outputlookup append=true newlookup.csv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Mar 2018 16:54:32 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-03-13T16:54:32Z</dc:date>
    <item>
      <title>How do you append new results in a lookup file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-append-new-results-in-a-lookup-file/m-p/347480#M102914</link>
      <description>&lt;P&gt;I have a lookup table that runs every month of previous successful logins.  For example:&lt;/P&gt;

&lt;P&gt;Account_Name, Host&lt;BR /&gt;
alpha, comp1 comp2 comp3&lt;BR /&gt;
bravo, comp1 comp3&lt;BR /&gt;
charlie, comp2&lt;/P&gt;

&lt;P&gt;Now I have a scheduled report to run daily to determine any differences between the lookup file and account names and hosts of new daily logons.  So, for example, if the new data is...&lt;/P&gt;

&lt;P&gt;Account_Name, Host&lt;BR /&gt;
alpha, comp4&lt;BR /&gt;
alpha, comp5&lt;BR /&gt;
bravo, comp2&lt;BR /&gt;
charlie, comp1&lt;/P&gt;

&lt;P&gt;I want my new lookup table to compensate for this.  New result set will be as follow:&lt;BR /&gt;
Account_Name, Host&lt;BR /&gt;
alpha, comp1 comp2 comp3 comp4 comp5&lt;BR /&gt;
bravo, comp1 comp2 comp3&lt;BR /&gt;
charlie, comp1 comp2&lt;/P&gt;

&lt;P&gt;How do I write the outputlookup portion to append the new data to the old data in the lookup file?&lt;/P&gt;

&lt;P&gt;My query is as follow to obtain new data:&lt;BR /&gt;
index=main NOT [ | inputlookup baseline.csv ] | table Account_Name Host&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 15:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-append-new-results-in-a-lookup-file/m-p/347480#M102914</guid>
      <dc:creator>chanthongphiob</dc:creator>
      <dc:date>2018-03-13T15:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do you append new results in a lookup file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-append-new-results-in-a-lookup-file/m-p/347481#M102915</link>
      <description>&lt;P&gt;search blah |  inputlookup append=true X.cvs | outputlookup X.csv&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 16:21:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-append-new-results-in-a-lookup-file/m-p/347481#M102915</guid>
      <dc:creator>jameswatts</dc:creator>
      <dc:date>2018-03-13T16:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do you append new results in a lookup file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-append-new-results-in-a-lookup-file/m-p/347482#M102916</link>
      <description>&lt;P&gt;Hi @chanthongphiob,&lt;BR /&gt;
Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main NOT [ | inputlookup baseline.csv ] | table Account_Name Host| outputlookup append=true newlookup.csv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Mar 2018 16:54:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-append-new-results-in-a-lookup-file/m-p/347482#M102916</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-03-13T16:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you append new results in a lookup file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-append-new-results-in-a-lookup-file/m-p/530382#M149857</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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 07:33:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-append-new-results-in-a-lookup-file/m-p/530382#M149857</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-11-23T07:33:09Z</dc:date>
    </item>
  </channel>
</rss>

