<?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: Why I am not seeing the headers for columns that have all null values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284159#M85904</link>
    <description>&lt;P&gt;What API endpoint are you using?  You only mention URL not /saved/searches/  ... etc&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2016 18:01:07 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2016-04-06T18:01:07Z</dc:date>
    <item>
      <title>Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284150#M85895</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;I am using a curl command to extract data from Splunk. When at least one value for the column is there, I can see the header for that column, but when the entire column is null, I don't see the header itself. Can some one help me to fix this?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 17:59:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284150#M85895</guid>
      <dc:creator>sandeepkumarmis</dc:creator>
      <dc:date>2016-04-05T17:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284151#M85896</link>
      <description>&lt;P&gt;if you're using the preview_results endpoint with output_mode:json_rows, you should be able to set the field_list to include the fields you want. Those fields then should come back even if all the values are NULL.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284151#M85896</guid>
      <dc:creator>arobbins_splunk</dc:creator>
      <dc:date>2020-09-29T09:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284152#M85897</link>
      <description>&lt;P&gt;I am using output_mod:csv. &lt;BR /&gt;
I found this can not be done. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/Data/Extractfieldsfromfileheadersatindextime"&gt;http://docs.splunk.com/Documentation/Splunk/6.0/Data/Extractfieldsfromfileheadersatindextime&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 18:48:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284152#M85897</guid>
      <dc:creator>sandeepkumarmis</dc:creator>
      <dc:date>2016-04-05T18:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284153#M85898</link>
      <description>&lt;P&gt;Use the fillnull command to fill the null values...&lt;/P&gt;

&lt;P&gt;root search... | fillnull value=null | ... statistical/charting command&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 21:19:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284153#M85898</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-05T21:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284154#M85899</link>
      <description>&lt;P&gt;I tried this as well, but still I neither get the field null values nor the header names.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 15:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284154#M85899</guid>
      <dc:creator>sandeepkumarmis</dc:creator>
      <dc:date>2016-04-06T15:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284155#M85900</link>
      <description>&lt;P&gt;Can you please share the search?  &lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 15:58:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284155#M85900</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-06T15:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284156#M85901</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;curl -k -u  &lt;A href="https://url" target="test_blank"&gt;https://url&lt;/A&gt;  -d search="search index=   sourcetype= earliest=-30d latest=now | fillnull value=null |  sort -_time | rename _time AS time | convert ctime(time) | table field1,field2,field3,field4,field5,field5" -d output_mode=csv -o /home/username/test.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output&lt;BR /&gt;
field5&lt;BR /&gt;
608&lt;BR /&gt;
214&lt;BR /&gt;
407&lt;BR /&gt;
860&lt;BR /&gt;
219&lt;BR /&gt;
901&lt;BR /&gt;
843&lt;BR /&gt;
904&lt;BR /&gt;
480&lt;/P&gt;

&lt;P&gt;I am expecting something like&lt;BR /&gt;
field1,field2,field3,field4,field5&lt;BR /&gt;
,,,,608&lt;BR /&gt;
,,,,214&lt;BR /&gt;
,,,,407&lt;BR /&gt;
,,,,860&lt;BR /&gt;
,,,,219&lt;BR /&gt;
,,,,901&lt;BR /&gt;
,,,,843&lt;BR /&gt;
,,,,904&lt;BR /&gt;
,,,,480&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 16:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284156#M85901</guid>
      <dc:creator>sandeepkumarmis</dc:creator>
      <dc:date>2016-04-06T16:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284157#M85902</link>
      <description>&lt;P&gt;OK... so since field1,field2,field3,field4 are null when you get to the pipe with fillnull, the search processor doesn't know that they exist, and therefore cannot fill them with null...&lt;/P&gt;

&lt;P&gt;try:&lt;BR /&gt;
... | fillnull value=NULL field1,field2,field3,field4,field5 | ...&lt;/P&gt;

&lt;P&gt;that should explicitly tell the fillnull processor that those fields exist and need to be set.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 16:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284157#M85902</guid>
      <dc:creator>arobbins_splunk</dc:creator>
      <dc:date>2016-04-06T16:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284158#M85903</link>
      <description>&lt;P&gt;Try uppercase null &lt;CODE&gt;.. | fillnull value=NULL&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 16:39:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284158#M85903</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-04-06T16:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284159#M85904</link>
      <description>&lt;P&gt;What API endpoint are you using?  You only mention URL not /saved/searches/  ... etc&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 18:01:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284159#M85904</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-06T18:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284160#M85905</link>
      <description>&lt;P&gt;I have a work around... i've seen this before and the conclusion is the API doesnt export the null values.  This is the work around:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search index=indexname
| sort - _time 
| rename _time AS time 
| convert ctime(time)  
| eval fielda=if(isnull(fielda),",",fielda)
| eval fieldb=if(isnull(fieldb),",",fieldb)
| eval fieldc=if(isnull(fieldc),",",fieldc)
| eval fieldd=if(isnull(fieldd),",",fieldd)
| eval fielde=if(isnull(fielde),",",fielde)
| table fielda fieldb fieldc fieldd fielde
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What it will do is replace null values with commas and then the API is forced to export in correct csv format.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 18:42:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284160#M85905</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-06T18:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am not seeing the headers for columns that have all null values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284161#M85906</link>
      <description>&lt;P&gt;You can probably do this several other ways like the 'fill null value="," (fields here)' &lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 19:59:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-I-am-not-seeing-the-headers-for-columns-that-have-all-null/m-p/284161#M85906</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-06T19:59:30Z</dc:date>
    </item>
  </channel>
</rss>

