<?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 disappearing NULL-columns when sorting a table in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342604#M5326</link>
    <description>&lt;P&gt;Hey everyone,&lt;/P&gt;

&lt;P&gt;I have an issues with a table that has an empty column:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| head 10
| table _time host "my field" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using Splunk 6.5.2 this results in a table with three columns: &lt;CODE&gt;_time&lt;/CODE&gt;, &lt;CODE&gt;host&lt;/CODE&gt; and &lt;CODE&gt;my field&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;When I click on any column header for sorting the column &lt;CODE&gt;my field&lt;/CODE&gt; disappears.&lt;/P&gt;

&lt;P&gt;Even &lt;CODE&gt;fillnull&lt;/CODE&gt; does not work as I expected:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| head 10
| table _time host "my field" 
| fillnull value="some value"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There is no filling, and sorting will make the column &lt;CODE&gt;my field&lt;/CODE&gt; disappear, again.&lt;/P&gt;

&lt;P&gt;What is working, but is clunky since I will have 15+ fields that might change some time in future:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| head 10
| table _time host "my field" 
| fillnull value="" "my field"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In my case I am actually using an &lt;CODE&gt;eval&lt;/CODE&gt; prior in order to calculate the &lt;CODE&gt;my field&lt;/CODE&gt; value. Since the source field is rarely present, the result is mostly &lt;CODE&gt;NULL&lt;/CODE&gt;. As if I was doing this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| head 10
| eval "my field"=null()
| table _time host "my field"
| fillnull value="" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(same problem)&lt;/P&gt;

&lt;P&gt;I hope I just missed something obvious.&lt;/P&gt;

&lt;P&gt;All the best,&lt;BR /&gt;
Björn&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2017 09:48:43 GMT</pubDate>
    <dc:creator>bjoernjensen</dc:creator>
    <dc:date>2017-03-08T09:48:43Z</dc:date>
    <item>
      <title>disappearing NULL-columns when sorting a table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342604#M5326</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;

&lt;P&gt;I have an issues with a table that has an empty column:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| head 10
| table _time host "my field" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using Splunk 6.5.2 this results in a table with three columns: &lt;CODE&gt;_time&lt;/CODE&gt;, &lt;CODE&gt;host&lt;/CODE&gt; and &lt;CODE&gt;my field&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;When I click on any column header for sorting the column &lt;CODE&gt;my field&lt;/CODE&gt; disappears.&lt;/P&gt;

&lt;P&gt;Even &lt;CODE&gt;fillnull&lt;/CODE&gt; does not work as I expected:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| head 10
| table _time host "my field" 
| fillnull value="some value"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There is no filling, and sorting will make the column &lt;CODE&gt;my field&lt;/CODE&gt; disappear, again.&lt;/P&gt;

&lt;P&gt;What is working, but is clunky since I will have 15+ fields that might change some time in future:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| head 10
| table _time host "my field" 
| fillnull value="" "my field"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In my case I am actually using an &lt;CODE&gt;eval&lt;/CODE&gt; prior in order to calculate the &lt;CODE&gt;my field&lt;/CODE&gt; value. Since the source field is rarely present, the result is mostly &lt;CODE&gt;NULL&lt;/CODE&gt;. As if I was doing this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| head 10
| eval "my field"=null()
| table _time host "my field"
| fillnull value="" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(same problem)&lt;/P&gt;

&lt;P&gt;I hope I just missed something obvious.&lt;/P&gt;

&lt;P&gt;All the best,&lt;BR /&gt;
Björn&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 09:48:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342604#M5326</guid>
      <dc:creator>bjoernjensen</dc:creator>
      <dc:date>2017-03-08T09:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: disappearing NULL-columns when sorting a table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342605#M5327</link>
      <description>&lt;P&gt;hi bjoernjensen,&lt;BR /&gt;
did you tried to assign a zero value when "my field" is null inserting something like this before your table command?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval "my field" = if(isnull("my field"),0,"my field")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 10:11:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342605#M5327</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-03-08T10:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: disappearing NULL-columns when sorting a table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342606#M5328</link>
      <description>&lt;P&gt;Hey Giuseppe,&lt;/P&gt;

&lt;P&gt;I certainly could fix each field (table column) with this odd behaviour using &lt;CODE&gt;fillnull value="" &amp;lt;FIELD_1&amp;gt;  &amp;lt;FIELD_2&amp;gt; ... &amp;lt;FIELD_n&amp;gt;&lt;/CODE&gt;. But I need something more universal. Like the default behaviour of &lt;CODE&gt;fillnull&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;field-list
Description: ... If not specified, fillnull is applied to all fields.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;source: &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Fillnull"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Fillnull&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Do I have to file a bug here?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 15:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342606#M5328</guid>
      <dc:creator>bjoernjensen</dc:creator>
      <dc:date>2017-03-08T15:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: disappearing NULL-columns when sorting a table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342607#M5329</link>
      <description>&lt;P&gt;Probably.&lt;BR /&gt;
Open a case on Partner Portal, this Will be useful For all splunkers.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe &lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 15:19:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342607#M5329</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-03-08T15:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: disappearing NULL-columns when sorting a table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342608#M5330</link>
      <description>&lt;P&gt;Can you try these&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal  | head 10  | table _time host "my field" 
| fillnull value="" *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal  | head 10  | table _time host "my field" 
| foreach * [eval "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"=coalesce('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',"")]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Mar 2017 15:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342608#M5330</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-08T15:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: disappearing NULL-columns when sorting a table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342609#M5331</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;thanks for the feedback.&lt;/P&gt;

&lt;P&gt;the first one results in two an additional column named &lt;CODE&gt;*&lt;/CODE&gt;, which does not disappear if sorted. &lt;CODE&gt;my field&lt;/CODE&gt; does disappear though&lt;/P&gt;

&lt;P&gt;the second one results in a table where &lt;CODE&gt;my field&lt;/CODE&gt;still disappears&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 15:24:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342609#M5331</guid>
      <dc:creator>bjoernjensen</dc:creator>
      <dc:date>2017-03-08T15:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: disappearing NULL-columns when sorting a table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342610#M5332</link>
      <description>&lt;P&gt;Due to feedback from slack this behaviour is only showing in 6.5.2. Not in 6.5.1 nor in 6.4.2.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 15:33:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342610#M5332</guid>
      <dc:creator>bjoernjensen</dc:creator>
      <dc:date>2017-03-08T15:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: disappearing NULL-columns when sorting a table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342611#M5333</link>
      <description>&lt;P&gt;Like this (field names with spaces are &lt;EM&gt;E*V*I*L&lt;/EM&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| head 10
| eval "my field"=if(isnull("my field"), "some value", 'my field')
| table _time host "my field" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:11:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/disappearing-NULL-columns-when-sorting-a-table/m-p/342611#M5333</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-09-29T13:11:29Z</dc:date>
    </item>
  </channel>
</rss>

