<?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 CSV File with multiple sections and headers in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/CSV-File-with-multiple-sections-and-headers/m-p/463416#M79967</link>
    <description>&lt;P&gt;I have a CSV file that has a header/title section with some interesting information in it (the run, application version, username, etc).  &lt;/P&gt;

&lt;P&gt;It then has 2 sections of CSV data with the same field names, but one is an exception section and one is the actual data.  It looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Run ID,100
Run Date/Time,6/13/2019 7:07:51 PM
Application Name,
Application Version,1.0.0.0
Protocol Name,
User Name,John Doe

[EXCEPTIONS]
field1,field2,field3,field4
value1,value2,value3,value4

[DETAILS]
field1,field2,field3,field4
value1,value2,,value4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am trying to avoid writing code to pre parse the data to something a little more Splunk friendly.  Any ideas on how to leverage props/transforms to get the Run ID, Timestamp, Username in each line under the 2 csv sections?  &lt;/P&gt;

&lt;P&gt;We are ok with merging the exceptions and details sections into 1 as we do not necessarily need to distinguish between the 2 sections.  But we do need to leverage one of the field rows as the CSV header values.&lt;/P&gt;

&lt;P&gt;Help appreciated! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2019 19:50:15 GMT</pubDate>
    <dc:creator>ddavenpo</dc:creator>
    <dc:date>2019-10-18T19:50:15Z</dc:date>
    <item>
      <title>CSV File with multiple sections and headers</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-File-with-multiple-sections-and-headers/m-p/463416#M79967</link>
      <description>&lt;P&gt;I have a CSV file that has a header/title section with some interesting information in it (the run, application version, username, etc).  &lt;/P&gt;

&lt;P&gt;It then has 2 sections of CSV data with the same field names, but one is an exception section and one is the actual data.  It looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Run ID,100
Run Date/Time,6/13/2019 7:07:51 PM
Application Name,
Application Version,1.0.0.0
Protocol Name,
User Name,John Doe

[EXCEPTIONS]
field1,field2,field3,field4
value1,value2,value3,value4

[DETAILS]
field1,field2,field3,field4
value1,value2,,value4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am trying to avoid writing code to pre parse the data to something a little more Splunk friendly.  Any ideas on how to leverage props/transforms to get the Run ID, Timestamp, Username in each line under the 2 csv sections?  &lt;/P&gt;

&lt;P&gt;We are ok with merging the exceptions and details sections into 1 as we do not necessarily need to distinguish between the 2 sections.  But we do need to leverage one of the field rows as the CSV header values.&lt;/P&gt;

&lt;P&gt;Help appreciated! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 19:50:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-File-with-multiple-sections-and-headers/m-p/463416#M79967</guid>
      <dc:creator>ddavenpo</dc:creator>
      <dc:date>2019-10-18T19:50:15Z</dc:date>
    </item>
  </channel>
</rss>

