<?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: need to consider special format in csv as same field value in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496028#M84604</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/73545"&gt;@anwar114&lt;/a&gt; yes that can be done at index timee. You would want to update the props.conf and create a new csv sourcetype. Copy the current stanza key pair as data is being extracted correctly. The key pair you want to modify is this &lt;BR /&gt;
FIELD_QUOTE = "&lt;BR /&gt;
Update to &lt;BR /&gt;
FIELD_QUOTE = '&lt;/P&gt;

&lt;P&gt;if you're using inputs.conf and any other .conf file or searches, you would want to update the sourcetype reference to this new sourcetype. &lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:34:37 GMT</pubDate>
    <dc:creator>anmolpatel</dc:creator>
    <dc:date>2020-09-30T04:34:37Z</dc:date>
    <item>
      <title>need to consider special format in csv as same field value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496024#M84600</link>
      <description>&lt;P&gt;Is there a way to let splunk know when ever the format like  "32770": ALL_REQ:2 | CT_FLAG(32768)  keep it as a single field value in csv .&lt;BR /&gt;
Data:&lt;BR /&gt;
"123","EMPTY","1766 Bytes",&lt;STRONG&gt;"32770": ALL_REQ:2 | CT_FLAG(32768),"131680": 20(32) | CT_FLAG |MODIFIED:20000(131072)&lt;/STRONG&gt;,"44d5","200 bytes"&lt;/P&gt;

&lt;P&gt;using normal csv extraction splunk extracts fields to :&lt;BR /&gt;
field1 :123&lt;BR /&gt;
field2: EMPTY&lt;BR /&gt;
field3: 1766 Bytes&lt;BR /&gt;
field4: "32770": ALL_REQ:2 | CT_FLAG(32768),"131680": 20(32) | CT_FLAG |MODIFIED:20000(131072), 44d5&lt;BR /&gt;
field5: "200 bytes"&lt;/P&gt;

&lt;P&gt;splunk combines field4 &amp;amp; field5 into a single field. thereafter all other field values gets  pre jumped .&lt;/P&gt;

&lt;P&gt;Result required after field extraction: &lt;/P&gt;

&lt;P&gt;field1 :123&lt;BR /&gt;
field2: EMPTY&lt;BR /&gt;
field3: 1766 Bytes&lt;BR /&gt;
&lt;STRONG&gt;field4:  "32770": ALL_REQ:2 | CT_FLAG(32768)&lt;/STRONG&gt;&lt;BR /&gt;
&lt;STRONG&gt;field5:  "131680": 20(32) | CT_FLAG |MODIFIED:20000(131072)&lt;/STRONG&gt;&lt;BR /&gt;
field6:  44d5&lt;BR /&gt;
field7: 200 bytes&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:38:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496024#M84600</guid>
      <dc:creator>anwar114</dc:creator>
      <dc:date>2020-09-30T04:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: need to consider special format in csv as same field value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496025#M84601</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/73545"&gt;@anwar114&lt;/a&gt; the issue is with your csv data. &lt;BR /&gt;
What you want to do is escape the quotations or remove them. So the data should be&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;as such:&lt;BR /&gt;
field1, field2, field3, field4, field5, field6, field7&lt;BR /&gt;
"123","EMPTY","1766 Bytes",32770: ALL_REQ:2 | CT_FLAG(32768),131680: 20(32) | CT_FLAG |MODIFIED:20000(131072),"44d5","200 bytes"&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;OR:&lt;BR /&gt;
field1, field2, field3, field4, field5, field6, field7&lt;BR /&gt;
"123","EMPTY","1766 Bytes",\"32770\": ALL_REQ:2 | CT_FLAG(32768),\"131680\": 20(32) | CT_FLAG |MODIFIED:20000(131072),"44d5","200 bytes"&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;OR:&lt;BR /&gt;
field1, field2, field3, field4, field5, field6, field7&lt;BR /&gt;
123,EMPTY,1766 Bytes,32770: ALL_REQ:2 | CT_FLAG(32768),131680: 20(32) | CT_FLAG |MODIFIED:20000(131072),44d5,200 bytes&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;and the csv sourcetype will work as expected&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:34:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496025#M84601</guid>
      <dc:creator>anmolpatel</dc:creator>
      <dc:date>2020-09-30T04:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: need to consider special format in csv as same field value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496026#M84602</link>
      <description>&lt;P&gt;is there a way to do it (escape the quotations or remove them ) from splunk before or while indexing. as the csv is an output from another system commandline there is no much we can do from that side. thx&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 04:16:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496026#M84602</guid>
      <dc:creator>anwar114</dc:creator>
      <dc:date>2020-03-16T04:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: need to consider special format in csv as same field value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496027#M84603</link>
      <description>&lt;P&gt;hi @anwar114,&lt;/P&gt;

&lt;P&gt;Add these configurations in forwarder. This will extract the fields before indexing.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_name]
TRANSFORM-fields = extract_fields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_fields]
SOURCE_KEY = field4
REGEX = (?&amp;lt;field4&amp;gt;[^\,]+),(?&amp;lt;field5&amp;gt;[^\,]+),\s*(?&amp;lt;field6&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If this is not possible you can also extract these during search time. Add the same configurations on search heads. This will extract fields whenever sourcetype is searched.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 07:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496027#M84603</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-16T07:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: need to consider special format in csv as same field value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496028#M84604</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/73545"&gt;@anwar114&lt;/a&gt; yes that can be done at index timee. You would want to update the props.conf and create a new csv sourcetype. Copy the current stanza key pair as data is being extracted correctly. The key pair you want to modify is this &lt;BR /&gt;
FIELD_QUOTE = "&lt;BR /&gt;
Update to &lt;BR /&gt;
FIELD_QUOTE = '&lt;/P&gt;

&lt;P&gt;if you're using inputs.conf and any other .conf file or searches, you would want to update the sourcetype reference to this new sourcetype. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:34:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-to-consider-special-format-in-csv-as-same-field-value/m-p/496028#M84604</guid>
      <dc:creator>anmolpatel</dc:creator>
      <dc:date>2020-09-30T04:34:37Z</dc:date>
    </item>
  </channel>
</rss>

