<?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: Ignoring header  in the csv file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325197#M60475</link>
    <description>&lt;P&gt;I think the problem is that you don't need to use INDEXED_EXTRACTIONS at all if you don't intend to have Splunk extract the data based on the field headers at the top of the CSV file. I think DELIMS is also a search-time extraction and it doesn't have any reliance on INDEXED_EXTRACTIONS. So you can use PREAMBLE_REGEX but just don't use INDEXED_EXTRACTIONS. Don't treat it like a CSV file, just treat it like a log file.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 14:18:29 GMT</pubDate>
    <dc:creator>michael_sleep</dc:creator>
    <dc:date>2020-09-29T14:18:29Z</dc:date>
    <item>
      <title>Ignoring header  in the csv file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325193#M60471</link>
      <description>&lt;P&gt;I want to index and search csv files in splunk.&lt;/P&gt;

&lt;P&gt;Each file has a header at the first line:&lt;/P&gt;

&lt;P&gt;number1,number2, number3,&lt;BR /&gt;
1,2,3&lt;BR /&gt;
4,5,6&lt;/P&gt;

&lt;P&gt;I've created a custom csv sourcetype in props.conf and defined custom fields i want to use instead of the header in transforms.conf:&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;P&gt;[custom-csv]&lt;BR /&gt;
DATETIME_CONFIG = CURRENT&lt;BR /&gt;
INDEXED_EXTRACTIONS = csv&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
category = Structured&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
disabled = false&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
REPORT-custom= REPORT-custom&lt;/P&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;P&gt;[REPORT-custom]&lt;BR /&gt;
DELIMS = ","&lt;BR /&gt;
FIELDS = number1, number2, number3&lt;/P&gt;

&lt;P&gt;However when i run a search i can still see the original field names extracted from the header plus the new ones i have defined in transforms.conf.&lt;/P&gt;

&lt;P&gt;Is there a way to make Splunk to ignore the header line?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325193#M60471</guid>
      <dc:creator>kiril123</dc:creator>
      <dc:date>2020-09-29T14:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring header  in the csv file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325194#M60472</link>
      <description>&lt;P&gt;Try using the &lt;CODE&gt;PREAMBLE_REGEX&lt;/CODE&gt; attribute in props.conf.  Something like this.  You may need to adjust the regex.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[custom-csv]
DATETIME_CONFIG = CURRENT
INDEXED_EXTRACTIONS = csv
PREAMBLE_REGEX = number1, number2, number3
NO_BINARY_CHECK = true
category = Structured
pulldown_type = true
SHOULD_LINEMERGE = false
disabled = false
KV_MODE = none
REPORT-custom= REPORT-custom
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 17:46:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325194#M60472</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-06-01T17:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring header  in the csv file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325195#M60473</link>
      <description>&lt;P&gt;I have tried using PREAMBLE_REGEX but now Splunk uses the next line as a header so i get 1,2,3 as the search fields, rather than values.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 18:08:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325195#M60473</guid>
      <dc:creator>kiril123</dc:creator>
      <dc:date>2017-06-01T18:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring header  in the csv file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325196#M60474</link>
      <description>&lt;P&gt;From your examples, it appears you are specifying the same field names that are already in the CSV.  If so, don't bother.  Omit the transform and let Splunk process the file normally.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 12:24:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325196#M60474</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-06-02T12:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring header  in the csv file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325197#M60475</link>
      <description>&lt;P&gt;I think the problem is that you don't need to use INDEXED_EXTRACTIONS at all if you don't intend to have Splunk extract the data based on the field headers at the top of the CSV file. I think DELIMS is also a search-time extraction and it doesn't have any reliance on INDEXED_EXTRACTIONS. So you can use PREAMBLE_REGEX but just don't use INDEXED_EXTRACTIONS. Don't treat it like a CSV file, just treat it like a log file.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:18:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ignoring-header-in-the-csv-file/m-p/325197#M60475</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2020-09-29T14:18:29Z</dc:date>
    </item>
  </channel>
</rss>

