<?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 problem with lookup command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/problem-with-lookup-command/m-p/54069#M13198</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a master .csv file in which I have 10 rows, now I have one more child file which contains only 4 rows, now I want to lookup with the 4 rows in the 10 rows , if found, replace one of the column in master file&lt;/P&gt;

&lt;P&gt;in my child.csv , only two columns "A" and "B"&lt;BR /&gt;
in my master.csv, many columns, "A","B","C","D"&lt;/P&gt;

&lt;P&gt;I have to match child.csv column "A" with master.csv column "A" and replace the value of column "B" of master.csv with the value of column "B" of child.csv&lt;/P&gt;

&lt;P&gt;|inputlookup "masterfile.csv"|....| lookup "child.csv" field_name&lt;/P&gt;

&lt;P&gt;but in this case what is happening is , value is getting replaced for the matched data but other values are becoming null&lt;/P&gt;

&lt;P&gt;I dont want that value to become null, unmatched value will remain same, only matched value will replace&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2013 08:38:16 GMT</pubDate>
    <dc:creator>abhayneilam</dc:creator>
    <dc:date>2013-03-07T08:38:16Z</dc:date>
    <item>
      <title>problem with lookup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-lookup-command/m-p/54069#M13198</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a master .csv file in which I have 10 rows, now I have one more child file which contains only 4 rows, now I want to lookup with the 4 rows in the 10 rows , if found, replace one of the column in master file&lt;/P&gt;

&lt;P&gt;in my child.csv , only two columns "A" and "B"&lt;BR /&gt;
in my master.csv, many columns, "A","B","C","D"&lt;/P&gt;

&lt;P&gt;I have to match child.csv column "A" with master.csv column "A" and replace the value of column "B" of master.csv with the value of column "B" of child.csv&lt;/P&gt;

&lt;P&gt;|inputlookup "masterfile.csv"|....| lookup "child.csv" field_name&lt;/P&gt;

&lt;P&gt;but in this case what is happening is , value is getting replaced for the matched data but other values are becoming null&lt;/P&gt;

&lt;P&gt;I dont want that value to become null, unmatched value will remain same, only matched value will replace&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2013 08:38:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-lookup-command/m-p/54069#M13198</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2013-03-07T08:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: problem with lookup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-lookup-command/m-p/54070#M13199</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Can you tried to use the "join type=left" yet?&lt;/P&gt;

&lt;P&gt;The idea I have is something like:&lt;/P&gt;

&lt;P&gt;|inputlookup "masterfile.csv"| join type=left A [| inputlookup "child.csv" | rename B as B_new]| eval B = if(isnotnull(B_new), B_new, B)| outputlookup "masterfile.csv"&lt;/P&gt;

&lt;P&gt;Hope it helps.&lt;BR /&gt;
Regards,&lt;BR /&gt;
Olivier &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:27:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-lookup-command/m-p/54070#M13199</guid>
      <dc:creator>OL</dc:creator>
      <dc:date>2020-09-28T13:27:48Z</dc:date>
    </item>
  </channel>
</rss>

