<?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 How to properly parse a CSV file with embedded double quotes on the end of a field before the file is indexed? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272073#M81865</link>
    <description>&lt;P&gt;The field ends with a protected quote followed by another quote &lt;/P&gt;

&lt;P&gt;Ex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; "field1",field2", "field3-sdasds\"textdata blah blah\"", "field4-#$%232", 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The embedded quotes are protected, but when the files are processed, it doesn't split the fields correctly and field 3 and 4 end up together.&lt;/P&gt;

&lt;P&gt;I have experimented with adding  a space between the protected quote and field terminating quote and it seems to work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;field1",field2", "field3-sdasds\"textdata blah blah\" ", "field4-#$%232"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there someway to do this automatically before the files are indexed?&lt;/P&gt;</description>
    <pubDate>Mon, 14 Dec 2015 23:45:43 GMT</pubDate>
    <dc:creator>jhuysing</dc:creator>
    <dc:date>2015-12-14T23:45:43Z</dc:date>
    <item>
      <title>How to properly parse a CSV file with embedded double quotes on the end of a field before the file is indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272073#M81865</link>
      <description>&lt;P&gt;The field ends with a protected quote followed by another quote &lt;/P&gt;

&lt;P&gt;Ex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; "field1",field2", "field3-sdasds\"textdata blah blah\"", "field4-#$%232", 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The embedded quotes are protected, but when the files are processed, it doesn't split the fields correctly and field 3 and 4 end up together.&lt;/P&gt;

&lt;P&gt;I have experimented with adding  a space between the protected quote and field terminating quote and it seems to work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;field1",field2", "field3-sdasds\"textdata blah blah\" ", "field4-#$%232"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there someway to do this automatically before the files are indexed?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 23:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272073#M81865</guid>
      <dc:creator>jhuysing</dc:creator>
      <dc:date>2015-12-14T23:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly parse a CSV file with embedded double quotes on the end of a field before the file is indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272074#M81866</link>
      <description>&lt;P&gt;You're gonna have to escape the rogue quote. &lt;BR /&gt;
    field1",field2", "field3-sdasds"textdata blah blah\" ", "field4-#$%232"&lt;BR /&gt;
Any quote that's supposed to be ingested as data rather than a delimiter should be escaped by whatever software is constructing the logs. &lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 23:53:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272074#M81866</guid>
      <dc:creator>andrew207</dc:creator>
      <dc:date>2015-12-14T23:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly parse a CSV file with embedded double quotes on the end of a field before the file is indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272075#M81867</link>
      <description>&lt;P&gt;field3 should look like this &lt;CODE&gt;"field3-sdasds\"textdata blah blah\"", "field4-#$%232"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 00:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272075#M81867</guid>
      <dc:creator>jhuysing</dc:creator>
      <dc:date>2015-12-15T00:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly parse a CSV file with embedded double quotes on the end of a field before the file is indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272076#M81868</link>
      <description>&lt;P&gt;try this again&lt;/P&gt;

&lt;P&gt;field3 should look like this "field3-sdasds\"textdata blah blah\"", "field4-#$%232"&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 00:08:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272076#M81868</guid>
      <dc:creator>jhuysing</dc:creator>
      <dc:date>2015-12-15T00:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly parse a CSV file with embedded double quotes on the end of a field before the file is indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272077#M81869</link>
      <description>&lt;P&gt;ok how do enter backslashes here so they don't get absorbed&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 00:09:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272077#M81869</guid>
      <dc:creator>jhuysing</dc:creator>
      <dc:date>2015-12-15T00:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly parse a CSV file with embedded double quotes on the end of a field before the file is indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272078#M81870</link>
      <description>&lt;P&gt;Hi @jhuysing&lt;/P&gt;

&lt;P&gt;To get backslashes to render properly, you have to wrap your line of text in back ticks like &lt;CODE&gt;this&lt;/CODE&gt; so lines like &lt;CODE&gt;\backslash\backslash\ \ \&lt;/CODE&gt; will show up as expected. If you're every sharing a .conf stanza, it's best to highlight the entire block and click on the "Code Sample" button in the text editing tools above the text box, especially when showing anything with regular expressions. For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[stanza]
REGEX = *\&amp;lt;&amp;amp;&amp;gt;\*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Dec 2015 01:27:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-properly-parse-a-CSV-file-with-embedded-double-quotes-on/m-p/272078#M81870</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-12-15T01:27:08Z</dc:date>
    </item>
  </channel>
</rss>

