<?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: add new fieldname to empty and also filled csv lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749549#M242170</link>
    <description>&lt;P&gt;Hello yuanliu,&lt;/P&gt;&lt;P&gt;fillnull is only working, if there is an empty row existing in addition to the fieldname. In case table2.csv has only the filednames in it, fillnull is not working.&lt;/P&gt;&lt;P&gt;I tried many things with fillnull, eval as well to add a row, append the new fieldname, but at the end I didn't manage to delete my added row to get only the original status of the lookup ONLY added by a next fieldname.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jul 2025 08:05:11 GMT</pubDate>
    <dc:creator>mfleitma</dc:creator>
    <dc:date>2025-07-10T08:05:11Z</dc:date>
    <item>
      <title>add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749502#M242156</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;I have a variety of CSV lookup tables &lt;/SPAN&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;SPAN&gt; have &lt;/SPAN&gt;&lt;SPAN&gt;to&lt;/SPAN&gt; &lt;SPAN&gt;add&lt;/SPAN&gt;&lt;SPAN&gt; a field &lt;/SPAN&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;SPAN&gt; each of these tables. The CSV files are used &lt;/SPAN&gt;&lt;SPAN&gt;by&lt;/SPAN&gt;&lt;SPAN&gt; scheduled searches, so I need their contents &lt;/SPAN&gt;&lt;SPAN&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt; the field names.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;table1.csv:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;index&lt;/SPAN&gt;&lt;SPAN&gt;,sourcetype&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;index1,st1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;table2.csv:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;sourcetype,source&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;st1,source1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;table3.csv:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;field1,field2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-&lt;/SPAN&gt; &lt;SPAN&gt;no&lt;/SPAN&gt; &lt;SPAN&gt;rows&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;For&lt;/SPAN&gt;&lt;SPAN&gt; this, I &lt;/SPAN&gt;&lt;SPAN&gt;use&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN&gt;following&lt;/SPAN&gt;&lt;SPAN&gt; spl:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;| inputlookup table1.csv | &lt;/SPAN&gt;&lt;SPAN&gt;table&lt;/SPAN&gt; &lt;SPAN&gt;index&lt;/SPAN&gt;&lt;SPAN&gt;,sourcetype,comment1 | outputlookup table1.csv&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;| inputlookup table2.csv | &lt;/SPAN&gt;&lt;SPAN&gt;table&lt;/SPAN&gt;&lt;SPAN&gt; sourcetype,source,comment2 | outputlookup table2.csv&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;| inputlookup table3.csv | &lt;/SPAN&gt;&lt;SPAN&gt;table&lt;/SPAN&gt;&lt;SPAN&gt; field1,field2,comment3 | outputlookup table3.csv&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;For&lt;/SPAN&gt;&lt;SPAN&gt; table1 &lt;/SPAN&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;SPAN&gt; table2, this works. But &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; table3, I have the problem that outputlookup creates an &lt;/SPAN&gt;&lt;SPAN&gt;empty&lt;/SPAN&gt; &lt;SPAN&gt;table&lt;/SPAN&gt; &lt;SPAN&gt;and&lt;/SPAN&gt;&lt;SPAN&gt; the field names are missing. &lt;/SPAN&gt;&lt;SPAN&gt;Is&lt;/SPAN&gt;&lt;SPAN&gt; there a search that can extend &lt;/SPAN&gt;&lt;SPAN&gt;empty&lt;/SPAN&gt; &lt;SPAN&gt;and&lt;/SPAN&gt;&lt;SPAN&gt; filled lookups?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Jul 2025 13:06:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749502#M242156</guid>
      <dc:creator>mfleitma</dc:creator>
      <dc:date>2025-07-09T13:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749503#M242157</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/46880"&gt;@mfleitma&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;is it acceptable to replace the empty fild with another char e.g. "-"=&lt;/P&gt;&lt;P&gt;in this case,&amp;nbsp; you can use the fillnull command.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 13:38:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749503#M242157</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-07-09T13:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749538#M242165</link>
      <description>&lt;P&gt;Make sure to apply &lt;FONT face="courier new,courier"&gt;fillnull&lt;/FONT&gt; &lt;STRONG&gt;before&lt;/STRONG&gt; &lt;FONT face="courier new,courier"&gt;table&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup table3.csv
| fillnull field1,field2,comment3 value=-
| table field1,field2,comment3
| outputlookup table3.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 21:50:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749538#M242165</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2025-07-09T21:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749542#M242167</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/46880"&gt;@mfleitma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try to use appendpipe to maintain the header&lt;/P&gt;&lt;P&gt;| inputlookup table3.csv&lt;BR /&gt;| appendpipe [ stats count | eval field1="", field2="", comment3="" ]&lt;BR /&gt;| fields field1, field2, comment3&lt;BR /&gt;| outputlookup table3.csv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Prewin&lt;BR /&gt;Splunk Enthusiast | Always happy to help! If this answer helped you, please consider marking it as the solution or giving a Karma. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 04:57:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749542#M242167</guid>
      <dc:creator>PrewinThomas</dc:creator>
      <dc:date>2025-07-10T04:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749548#M242169</link>
      <description>&lt;P&gt;Thank you for your suggestion.&lt;/P&gt;&lt;P&gt;Tried this, but I get a new row in table3.csv&lt;/P&gt;&lt;P&gt;field1,field2,comment3&lt;BR /&gt;"","",""&lt;/P&gt;&lt;P&gt;This is not acceptable for the later process. Empty rows are ok.&lt;/P&gt;&lt;P&gt;Changed your spl to&lt;/P&gt;&lt;P&gt;| inputlookup table3.csv&lt;BR /&gt;| appendpipe [ stats count | eval field1=NULL, field2=NULL, comment3=NULL ]&lt;BR /&gt;| fields field1, field2, comment3&lt;BR /&gt;| outputlookup table3.csv&lt;/P&gt;&lt;P&gt;But this is creating an empty lookup table3.csv again.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 07:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749548#M242169</guid>
      <dc:creator>mfleitma</dc:creator>
      <dc:date>2025-07-10T07:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749549#M242170</link>
      <description>&lt;P&gt;Hello yuanliu,&lt;/P&gt;&lt;P&gt;fillnull is only working, if there is an empty row existing in addition to the fieldname. In case table2.csv has only the filednames in it, fillnull is not working.&lt;/P&gt;&lt;P&gt;I tried many things with fillnull, eval as well to add a row, append the new fieldname, but at the end I didn't manage to delete my added row to get only the original status of the lookup ONLY added by a next fieldname.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 08:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749549#M242170</guid>
      <dc:creator>mfleitma</dc:creator>
      <dc:date>2025-07-10T08:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749550#M242171</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/46880"&gt;@mfleitma&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I thought you want to keep empty row as well. Can you try this then for only to have headers&lt;BR /&gt;&lt;BR /&gt;| inputlookup table3.csv&lt;BR /&gt;| appendpipe [ stats count | eval field1="", field2="", comment3="" | where 1=0 ]&lt;BR /&gt;| fields field1, field2, comment3&lt;BR /&gt;| outputlookup table3.csv&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Prewin&lt;BR /&gt;Splunk Enthusiast | Always happy to help! If this answer helped you, please consider marking it as the solution or giving a Karma. Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 08:50:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749550#M242171</guid>
      <dc:creator>PrewinThomas</dc:creator>
      <dc:date>2025-07-10T08:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749576#M242178</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Tried this, but I get a new row in table3.csv&lt;/BLOCKQUOTE&gt;&lt;P&gt;That is exactly what appendpipe is supposed to do. &amp;nbsp;If this is not acceptable, do not use appendpipe. &amp;nbsp;Have you tried fillnull&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;and I have suggested?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 16:42:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749576#M242178</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2025-07-10T16:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749627#M242191</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/28010"&gt;@PrewinThomas&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;This is helpfull. It is not the solution I prefer at the beginning, but the result is acceptable for the later process of my scheduled searches.&lt;BR /&gt;For the documentation:&lt;BR /&gt;the appendpipe is not working in case there is ONLY the line with the fieldnames in the csv:&lt;BR /&gt;&lt;BR /&gt;A_Row1: field1,field2&lt;BR /&gt;&lt;BR /&gt;In case there is a LF in it like:&lt;BR /&gt;&lt;SPAN&gt;B_Row1: field1,field2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;B_Row2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;it is running well. I get in the updated csv now:&lt;BR /&gt;C_Row1: field1,field2,comment3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C_Row2: ,,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would feel better, if B_Row2 would not be necessary, but it I can handle this.&lt;BR /&gt;&lt;BR /&gt;Many thx for your help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 12:05:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749627#M242191</guid>
      <dc:creator>mfleitma</dc:creator>
      <dc:date>2025-07-11T12:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: add new fieldname to empty and also filled csv lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749628#M242192</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/46880"&gt;@mfleitma&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 12:10:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-new-fieldname-to-empty-and-also-filled-csv-lookup/m-p/749628#M242192</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-07-11T12:10:01Z</dc:date>
    </item>
  </channel>
</rss>

