<?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: Is it possible to replace null fields at index-time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/746671#M241687</link>
    <description>&lt;P&gt;This seems to work in GUI.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval data="D,2,,200,00,8842,,USA,,1989,,2,320301120086,,,,,19899717024,,,320335100002,,,,,:,,,0,0,0,S,00000000,0,0.0,19899717024,104129,,,0,,,,,"
| rex mode=sed field=data "s/,,/,Null,/g"
| rex mode=sed field=data "s/,,/,Null,/g"
| rex mode=sed field=data "s/^,/Null,/g"
| rex mode=sed field=data "s/,$/,Null/g"
| table data&lt;/LI-CODE&gt;&lt;P&gt;I don't know exact reason why this is needed twice&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex mode=sed field=data "s/,,/,Null,/g"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Somehow it related to handling always two continuous characters and this is reason why it needs to run twice.&amp;nbsp;&lt;/P&gt;&lt;P&gt;These two lines is needed to manage 1st and last pairs (,Null and Null,) correctly.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex mode=sed field=data "s/^,/Null,/g"
| rex mode=sed field=data "s/,$/,Null/g"&lt;/LI-CODE&gt;&lt;P&gt;I think that you could add a new transforms.conf for index time changes based on above?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 May 2025 14:10:12 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2025-05-21T14:10:12Z</dc:date>
    <item>
      <title>Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282132#M85151</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have to search saved as quickly as possible. I CSV indexes whose columns are sometimes empty. I have to put a value by default with the fillnull command because the data is used by external software (Tableau )&lt;/P&gt;

&lt;P&gt;The docs say (&lt;A href="https://docs.splunk.com/Documentation/ODBC/2.1.0/UseODBC/Troubleshooting"&gt;https://docs.splunk.com/Documentation/ODBC/2.1.0/UseODBC/Troubleshooting&lt;/A&gt; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;"Null fields are not handled in the same way as you might be used to with other database systems. For example, they might inconsistently appear when you add or remove columns to your query.&lt;BR /&gt;
This behavior is expected. To prevent this from happening, add functionality to your report (saved search in Splunk Enterprise 5) that gives null fields a constant literal value—for example, the string "Null". This ensures that null fields appear consistently."&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;But the command &lt;CODE&gt;fillnull&lt;/CODE&gt; slowed search. So I would like the empty fields or tagged it with a value by default to avoid calling the fillnull order. It is possible?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 14:58:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282132#M85151</guid>
      <dc:creator>bvivi57</dc:creator>
      <dc:date>2016-07-27T14:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282133#M85152</link>
      <description>&lt;P&gt;The fillnull done at search time will cause in-efficient searching and fillnull done at index time will cause in-efficient indexing. If you're willing to do that, you've something called SEDCMD in props.conf (to be put in the sourcetype definition at the indexers), using which you can replace blank values to something suiting your need. (e.g. for your csv data, replacing &lt;CODE&gt;,,&lt;/CODE&gt; with &lt;CODE&gt;,Null,&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;E.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
..other settings..
SEDCMD-replaceblanks = s/,,/,Null,/g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jul 2016 16:46:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282133#M85152</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-27T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282134#M85153</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;
Thanks for your help. I can almost my goal. But the fields do not have the value "Null"&lt;BR /&gt;
I have this configuration on my props.conf&lt;/P&gt;

&lt;P&gt;SEDCMD-replaceblanks = s/;;/;Null;/g&lt;/P&gt;

&lt;P&gt;Ans the result is&lt;BR /&gt;
&lt;IMG src="https://time.coolcorp.fr/images/divers/not_good.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;But I seek to have this result&lt;BR /&gt;
&lt;IMG src="https://time.coolcorp.fr/images/divers/good.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 17:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282134#M85153</guid>
      <dc:creator>bvivi57</dc:creator>
      <dc:date>2016-07-27T17:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282135#M85154</link>
      <description>&lt;P&gt;Seems like  the field extraction is broken. Could you post the props/transforms in Search Head for your sourcetype?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 18:07:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282135#M85154</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-27T18:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282136#M85155</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Thank for your help ! &lt;/P&gt;

&lt;P&gt;My props.conf :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[csv_report_tab]
DATETIME_CONFIG =
INDEXED_EXTRACTIONS = csv
KV_MODE = none
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIMESTAMP_FIELDS = date
TIME_FORMAT = %d/%m/%Y
category = Structured
description = "Source type du fichier CSV"
disabled = false
pulldown_type = true
SEDCMD-replaceblanks = s/;;/;Null;/g
TRANSFORMS-id_source = trans_id_source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[trans_id_source]
SOURCE_KEY = MetaData:Source
REGEX = ^(?:[^\\\n]*\\){7}\w+_(?P&amp;lt;portefeuille_id&amp;gt;\d+)_(?P&amp;lt;date_trt&amp;gt;\d+)_(?P&amp;lt;id_dollaru&amp;gt;\d+)
FORMAT = portefeuille_id::$1 date_trt::$2 id_dollaru::$3 base::$1"_"$2
WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:15:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282136#M85155</guid>
      <dc:creator>bvivi57</dc:creator>
      <dc:date>2016-07-28T09:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282137#M85156</link>
      <description>&lt;P&gt;Your props.conf setting looks correct.  This operation is performed at index time.  Are you pushing it in an app to your indexer or heavy forwarder? &lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 00:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282137#M85156</guid>
      <dc:creator>sjohnson_splunk</dc:creator>
      <dc:date>2016-08-02T00:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282138#M85157</link>
      <description>&lt;P&gt;My apps is on Heavy Forwarder (Windows Server 2012 R2) and on Search Head (Centos 7). I have nothing on my Indexer (Centos 7).&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 08:05:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/282138#M85157</guid>
      <dc:creator>bvivi57</dc:creator>
      <dc:date>2016-08-02T08:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/746666#M241684</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for this approach. But it works only when we have one empty value in row, but if not looks like it doesnt replace every value properly.&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;D&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,,&lt;/SPAN&gt;&lt;SPAN class=""&gt;200&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;00&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;8842&lt;/SPAN&gt;&lt;SPAN&gt;,,&lt;/SPAN&gt;&lt;SPAN class=""&gt;USA&lt;/SPAN&gt;&lt;SPAN&gt;,,&lt;/SPAN&gt;&lt;SPAN class=""&gt;1989&lt;/SPAN&gt;&lt;SPAN&gt;,,&lt;/SPAN&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;320301120086&lt;/SPAN&gt;&lt;SPAN&gt;,,,,,&lt;/SPAN&gt;&lt;SPAN class=""&gt;19899717024&lt;/SPAN&gt;&lt;SPAN&gt;,,,&lt;/SPAN&gt;&lt;SPAN class=""&gt;320335100002&lt;/SPAN&gt;&lt;SPAN&gt;,,,,,&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;,,,&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;S&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;00000000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;0.0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;19899717024&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;104129&lt;/SPAN&gt;&lt;SPAN&gt;,,,&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,,,,,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you please suggest a solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 10:09:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/746666#M241684</guid>
      <dc:creator>LIS</dc:creator>
      <dc:date>2025-05-21T10:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/746670#M241686</link>
      <description>&lt;P&gt;solution:&lt;/P&gt;&lt;P&gt;SEDCMD-replaceblanks1 = s/,,/,-,/g&lt;BR /&gt;SEDCMD-replaceblanks2 = s/,,/,-,/g&lt;BR /&gt;SEDCMD-replaceblanks3 = s/,,/,-,/g&lt;BR /&gt;SEDCMD-replaceblanks4 = s/,,/,-,/g&lt;BR /&gt;SEDCMD-replaceblanks5 = s/,,/,-,/g&lt;BR /&gt;SEDCMD-replaceblanks6 = s/,,/,-,/g&lt;BR /&gt;SEDCMD-replaceblanks7 = s/,,/,-,/g&lt;BR /&gt;SEDCMD-replaceblanks8 = s/,,/,-,/g&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 13:06:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/746670#M241686</guid>
      <dc:creator>LIS</dc:creator>
      <dc:date>2025-05-21T13:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to replace null fields at index-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/746671#M241687</link>
      <description>&lt;P&gt;This seems to work in GUI.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval data="D,2,,200,00,8842,,USA,,1989,,2,320301120086,,,,,19899717024,,,320335100002,,,,,:,,,0,0,0,S,00000000,0,0.0,19899717024,104129,,,0,,,,,"
| rex mode=sed field=data "s/,,/,Null,/g"
| rex mode=sed field=data "s/,,/,Null,/g"
| rex mode=sed field=data "s/^,/Null,/g"
| rex mode=sed field=data "s/,$/,Null/g"
| table data&lt;/LI-CODE&gt;&lt;P&gt;I don't know exact reason why this is needed twice&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex mode=sed field=data "s/,,/,Null,/g"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Somehow it related to handling always two continuous characters and this is reason why it needs to run twice.&amp;nbsp;&lt;/P&gt;&lt;P&gt;These two lines is needed to manage 1st and last pairs (,Null and Null,) correctly.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex mode=sed field=data "s/^,/Null,/g"
| rex mode=sed field=data "s/,$/,Null/g"&lt;/LI-CODE&gt;&lt;P&gt;I think that you could add a new transforms.conf for index time changes based on above?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 14:10:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-replace-null-fields-at-index-time/m-p/746671#M241687</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2025-05-21T14:10:12Z</dc:date>
    </item>
  </channel>
</rss>

