<?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 is there a problem parsing empty CSV file which only contain a header? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-there-a-problem-parsing-empty-CSV-file-which-only-contain/m-p/373276#M67652</link>
    <description>&lt;P&gt;hello there,&lt;/P&gt;

&lt;P&gt;please read here:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.0/Data/Extractfieldsfromfileswithstructureddata#Only_header_fields_containing_data_are_indexed"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.0/Data/Extractfieldsfromfileswithstructureddata#Only_header_fields_containing_data_are_indexed&lt;/A&gt;&lt;BR /&gt;
maybe worthwhile to work with "no headers"&lt;BR /&gt;
this answer explains it in more detail:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/5404/best-way-to-define-fields-for-a-csv-with-no-headers.html"&gt;https://answers.splunk.com/answers/5404/best-way-to-define-fields-for-a-csv-with-no-headers.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2018 18:19:14 GMT</pubDate>
    <dc:creator>adonio</dc:creator>
    <dc:date>2018-02-14T18:19:14Z</dc:date>
    <item>
      <title>Why is there a problem parsing empty CSV file which only contain a header?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-there-a-problem-parsing-empty-CSV-file-which-only-contain/m-p/373275#M67651</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I receive log file from my servers.&lt;/P&gt;

&lt;P&gt;All files are CSVs.&lt;/P&gt;

&lt;P&gt;CSVs which contain header + data are well parsed.&lt;BR /&gt;
However, CSV which are empty an contain only the header following with nothing are not parsed correctly.&lt;/P&gt;

&lt;P&gt;Indeed, when empty file are parsed, Splunk parses the headers of the CSV as data.&lt;/P&gt;

&lt;P&gt;This is not the bahavior I want.&lt;/P&gt;

&lt;P&gt;When I configure the source, I checked to ignore the first line as the first line is always the header.&lt;/P&gt;

&lt;P&gt;Do you have any suggestion?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[csv_ad]
DATETIME_CONFIG =
HEADER_FIELD_LINE_NUMBER = 1
INDEXED_EXTRACTIONS = csv
KV_MODE = none
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Structured
description = Comma-separated value format. Set header and other settings in "Delimited Settings"
disabled = false
pulldown_type = true
TIMESTAMP_FIELDS =
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Feb 2018 14:17:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-there-a-problem-parsing-empty-CSV-file-which-only-contain/m-p/373275#M67651</guid>
      <dc:creator>danje57</dc:creator>
      <dc:date>2018-02-12T14:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why is there a problem parsing empty CSV file which only contain a header?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-there-a-problem-parsing-empty-CSV-file-which-only-contain/m-p/373276#M67652</link>
      <description>&lt;P&gt;hello there,&lt;/P&gt;

&lt;P&gt;please read here:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.0/Data/Extractfieldsfromfileswithstructureddata#Only_header_fields_containing_data_are_indexed"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.0/Data/Extractfieldsfromfileswithstructureddata#Only_header_fields_containing_data_are_indexed&lt;/A&gt;&lt;BR /&gt;
maybe worthwhile to work with "no headers"&lt;BR /&gt;
this answer explains it in more detail:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/5404/best-way-to-define-fields-for-a-csv-with-no-headers.html"&gt;https://answers.splunk.com/answers/5404/best-way-to-define-fields-for-a-csv-with-no-headers.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 18:19:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-there-a-problem-parsing-empty-CSV-file-which-only-contain/m-p/373276#M67652</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-02-14T18:19:14Z</dc:date>
    </item>
  </channel>
</rss>

