<?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 Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176734#M50764</link>
    <description>&lt;P&gt;Looking at understanding better how lookups work in Splunk.&lt;/P&gt;

&lt;P&gt;As I understand it, there are 3 steps: &lt;BR /&gt;
 1. lookup table files - basically you add your &lt;CODE&gt;*.csv&lt;/CODE&gt; file&lt;BR /&gt;&lt;BR /&gt;
 2. lookup definitions - name your lookup definition and link it to the above &lt;CODE&gt;*.csv&lt;/CODE&gt; file&lt;BR /&gt;
 3. Automatic lookups - this is where you do you mapping from the fields that are already in splunk with the fields in your &lt;CODE&gt;*.csv&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What I want to know specifically is as follows:&lt;BR /&gt;
If i had a lookup that was working fine off a csv file that only had X number of rows, lets say this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lookupA,ValueToReplaceLookup
A,America
B,Beijing
C,Columbia
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then sometime later, I come along and I just want to add a few new rows to the csv e.g. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lookupA,ValueToReplaceLookup
A,America
B,Beijing
C,Columbia
D,Denmark
E,Eygpt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is the best way of doing this without breaking anything? &lt;BR /&gt;
Do I just delete the existing csv and replace it with the new one, keeping the same name, and then I don't have to do step 2 &amp;amp; 3 above? &lt;BR /&gt;
Or is there a better way of doing it? &lt;/P&gt;</description>
    <pubDate>Tue, 18 Aug 2015 00:29:14 GMT</pubDate>
    <dc:creator>HattrickNZ</dc:creator>
    <dc:date>2015-08-18T00:29:14Z</dc:date>
    <item>
      <title>Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176734#M50764</link>
      <description>&lt;P&gt;Looking at understanding better how lookups work in Splunk.&lt;/P&gt;

&lt;P&gt;As I understand it, there are 3 steps: &lt;BR /&gt;
 1. lookup table files - basically you add your &lt;CODE&gt;*.csv&lt;/CODE&gt; file&lt;BR /&gt;&lt;BR /&gt;
 2. lookup definitions - name your lookup definition and link it to the above &lt;CODE&gt;*.csv&lt;/CODE&gt; file&lt;BR /&gt;
 3. Automatic lookups - this is where you do you mapping from the fields that are already in splunk with the fields in your &lt;CODE&gt;*.csv&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What I want to know specifically is as follows:&lt;BR /&gt;
If i had a lookup that was working fine off a csv file that only had X number of rows, lets say this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lookupA,ValueToReplaceLookup
A,America
B,Beijing
C,Columbia
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then sometime later, I come along and I just want to add a few new rows to the csv e.g. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lookupA,ValueToReplaceLookup
A,America
B,Beijing
C,Columbia
D,Denmark
E,Eygpt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is the best way of doing this without breaking anything? &lt;BR /&gt;
Do I just delete the existing csv and replace it with the new one, keeping the same name, and then I don't have to do step 2 &amp;amp; 3 above? &lt;BR /&gt;
Or is there a better way of doing it? &lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 00:29:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176734#M50764</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-08-18T00:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176735#M50765</link>
      <description>&lt;P&gt;Use this:&lt;BR /&gt;
|inputlookup my_file | append [ subsearch that gives you the remaining new rows ] | outputlookup my_file&lt;/P&gt;

&lt;P&gt;Basically this loads the content of your file, appends the result rows from the subsearch (should have the same column names) and saves everything in your file. Note that I keeped the same file name in both inputlookup and outputlookup.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:00:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176735#M50765</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2020-09-29T07:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176736#M50766</link>
      <description>&lt;P&gt;tks, but i was more interested in add the rows to the existing csv file and the nuploading it again. I presume you are assuming all the values I want are already in splunk, this would not be the case.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 01:37:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176736#M50766</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-08-18T01:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176737#M50767</link>
      <description>&lt;P&gt;Ok then just replace then csv or edit and save. You don't need to change de lookup definitions if you keep the same field names.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 02:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176737#M50767</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2015-08-18T02:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176738#M50768</link>
      <description>&lt;P&gt;You are misunderstanding the 3 &lt;CODE&gt;Knowledge Objects&lt;/CODE&gt; types for &lt;CODE&gt;lookups&lt;/CODE&gt;.  They stack together like this (depending on how you plan to use the CSV):&lt;/P&gt;

&lt;P&gt;KO1. Lookup Table - a CSV file in a specific directory.  This can be used with either a &lt;CODE&gt;Lookup Definition&lt;/CODE&gt; or the &lt;CODE&gt;inputlookup&lt;/CODE&gt; command.&lt;BR /&gt;
KO2. Lookup Definitions - the glue that is required to use a &lt;CODE&gt;lookup table file&lt;/CODE&gt; with the &lt;CODE&gt;lookup&lt;/CODE&gt; command.&lt;BR /&gt;
KO3. automatic lookups - causes a specific &lt;CODE&gt;lookup&lt;/CODE&gt; command to be run automatically for a specific sourcetype.&lt;/P&gt;

&lt;P&gt;So to modify it, just replace the file on your Search Head and it should take effect immediately.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 06:28:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176738#M50768</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-18T06:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176739#M50769</link>
      <description>&lt;P&gt;tks, my q was if 1 - i have uploaded the csv 2 - i have defined a lookup on the csv 3 - defined an auto lookup on 1 and 2. And then I decide I need to updatte the csv, in  1 above, then that is all i have to do by removing the old one and adding the new one, and I don't have to do any thing with 2 and 3 as they are now pointing at the newer csv?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 19:03:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176739#M50769</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-08-18T19:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176740#M50770</link>
      <description>&lt;P&gt;If it's just a few values you want to add, give this app a shot. It allows you to edit the lookup from splunk web.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1724/"&gt;https://splunkbase.splunk.com/app/1724/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2015 01:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176740#M50770</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2015-08-19T01:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176741#M50771</link>
      <description>&lt;P&gt;Correct, see my last line.  You also need to refresh the KO out of your browser session cache.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2015 13:46:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176741#M50771</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-19T13:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176742#M50772</link>
      <description>&lt;P&gt;Hi HattrickNZ,&lt;/P&gt;

&lt;P&gt;Please find answer at below link and it gives you exactly what do you want.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://hubpages.com/technology/Update-Splunk-file-based-lookup-from-search-results"&gt;http://hubpages.com/technology/Update-Splunk-file-based-lookup-from-search-results&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 21:54:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176742#M50772</guid>
      <dc:creator>thambisetty_bal</dc:creator>
      <dc:date>2016-07-14T21:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176743#M50773</link>
      <description>&lt;P&gt;Pick an answer that is best and click &lt;CODE&gt;Accept&lt;/CODE&gt; to close it.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 23:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176743#M50773</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-15T23:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176744#M50774</link>
      <description>&lt;P&gt;Hi, the link is broken.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 13:13:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176744#M50774</guid>
      <dc:creator>felipecerda</dc:creator>
      <dc:date>2017-01-05T13:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176745#M50775</link>
      <description>&lt;P&gt;Did you find the answer? I have exactly the same question, but do not understand the answers posted here.&lt;BR /&gt;
I just want to replace the file, I am surprise there is not an update option in the lookup.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 16:21:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176745#M50775</guid>
      <dc:creator>earriaga</dc:creator>
      <dc:date>2020-03-19T16:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can I update a CSV lookup file with more rows and how will this affect existing csv files and lookups?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176746#M50776</link>
      <description>&lt;P&gt;I know this conversation was a long time ago, but  Did you find the answer? I have exactly the same question, but do not understand the answers posted here.&lt;BR /&gt;
I just want to replace the file, I am surprise there is not an update option in the lookup.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 16:22:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-update-a-CSV-lookup-file-with-more-rows-and-how-will-this/m-p/176746#M50776</guid>
      <dc:creator>earriaga</dc:creator>
      <dc:date>2020-03-19T16:22:27Z</dc:date>
    </item>
  </channel>
</rss>

