<?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: Field Extraction with CSV File in Security</title>
    <link>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/693026#M17975</link>
    <description>&lt;P&gt;If it is only Col7 and Col10 that could have escaped commas, try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;Col1&amp;gt;[^,]+),(?&amp;lt;Col2&amp;gt;[^,]+),(?&amp;lt;Col3&amp;gt;[^,]+),(?&amp;lt;Col4&amp;gt;[^,]+),(?&amp;lt;Col5&amp;gt;[^,]+),(?&amp;lt;Col6&amp;gt;[^,]+),(?&amp;lt;Col7&amp;gt;.+?(?&amp;lt;!\\)),(?&amp;lt;Col8&amp;gt;[^,]+),(?&amp;lt;Col9&amp;gt;[^,]+),(?&amp;lt;Col10&amp;gt;.+?(?&amp;lt;!\\)),(?&amp;lt;Col11&amp;gt;[^,]+)$&lt;/LI-CODE&gt;&lt;P&gt;You may have to double-up the backslashes&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;Col1&amp;gt;[^,]+),(?&amp;lt;Col2&amp;gt;[^,]+),(?&amp;lt;Col3&amp;gt;[^,]+),(?&amp;lt;Col4&amp;gt;[^,]+),(?&amp;lt;Col5&amp;gt;[^,]+),(?&amp;lt;Col6&amp;gt;[^,]+),(?&amp;lt;Col7&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col8&amp;gt;[^,]+),(?&amp;lt;Col9&amp;gt;[^,]+),(?&amp;lt;Col10&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col11&amp;gt;[^,]+)$&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 11 Jul 2024 09:50:48 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-07-11T09:50:48Z</dc:date>
    <item>
      <title>Field Extraction with CSV File</title>
      <link>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/692947#M17971</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I have some issues with field parsing for the CSV files using props configuration. I should be getting 11 fields for each of the events/rows, but parsing is giving me 17 fields. Here are the 3 sample events (First row is header row) from that CSV file and the props.conf file is also provided below:&lt;/P&gt;&lt;P&gt;Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11&lt;/P&gt;&lt;P&gt;APIDEV,4xs54,000916,DEV,Update,Integrate,&lt;STRONG&gt;String\,Set\,Number\,ID,&lt;/STRONG&gt;Standard&lt;STRONG&gt;,&lt;/STRONG&gt;2024-07-10T23:10:45.001Z,&lt;STRONG&gt;Process_TIME\,URI\,Session_Key\,Services&lt;/STRONG&gt;,Hourly&lt;/P&gt;&lt;P&gt;APITEST,4ys34,000916,TEST,Update,Integrate&lt;STRONG&gt;,String\,Set\,Number\,String,Typicall\,Response&lt;/STRONG&gt;,2024-07-10T23:10:45.021Z,&lt;STRONG&gt;CPU_TIME\,URI\,Session_Key\,Type\,Request,&lt;/STRONG&gt;Monthly&lt;/P&gt;&lt;P&gt;APITEST,4ys34,000916,DEV,Insert,Integrate&lt;STRONG&gt;,Char\,Set\,System\,ID,&lt;/STRONG&gt;On_Demand,2024-07-10T23:10:45.051Z&lt;STRONG&gt;,CPU_TIME\,URI\,Session_Key\,Services,&lt;/STRONG&gt;Hourly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*Bold texts in each of the events should count one field&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[mypropscon]&lt;/P&gt;&lt;P&gt;SHOULD_LINEMERGE=False&lt;/P&gt;&lt;P&gt;LINE_BREAKER=([\r\n]+)&lt;/P&gt;&lt;P&gt;INDEXED_EXTRACTIONS=CSV&lt;/P&gt;&lt;P&gt;KV_MODE=none&lt;/P&gt;&lt;P&gt;disabled=false&lt;/P&gt;&lt;P&gt;TIME_FORMAT=%Y-%m-%dT%H:%M:%S.%QZ&lt;/P&gt;&lt;P&gt;HEARDER_FIELD_LINE_NUMBER=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any recommendation to resolve that issue will be highly appreciated. Thank you so much for your support as always.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 00:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/692947#M17971</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2024-07-11T00:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction with CSV File</title>
      <link>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/692964#M17972</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234909"&gt;@SplunkDash&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;let me understand:&amp;nbsp;you have 17 fields in your csv but you want to extract only 11 of them, is it correct?&lt;/P&gt;&lt;P&gt;do you want to delete the other fields or only you don't need them in visualization?&lt;/P&gt;&lt;P&gt;if you want to delete the extra fields, you can use SEDCMD to delete the extra fields before indexing.&lt;/P&gt;&lt;P&gt;In the second case, you can leave all as is and take only the 11 fields.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 06:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/692964#M17972</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-07-11T06:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction with CSV File</title>
      <link>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/692995#M17973</link>
      <description>&lt;P&gt;That's an interesting problem but I think it's a bit of a malformed data. If your field values contain commas, they should be enclosed in quotes.&lt;/P&gt;&lt;P&gt;If your column order is constant, you can define a regex-based search-time extraction including escaped commas in field value.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 08:31:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/692995#M17973</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-07-11T08:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction with CSV File</title>
      <link>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/693009#M17974</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your response, truly appreciate it. All values should be part of this extraction and outcome of this extraction should be and as an example:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;APIDEV,4xs54,000916,DEV,Update,Integrate,&lt;/SPAN&gt;&lt;STRONG&gt;String\,Set\,Number\,ID,&lt;/STRONG&gt;&lt;SPAN&gt;Standard&lt;/SPAN&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;SPAN&gt;2024-07-10T23:10:45.001Z,&lt;/SPAN&gt;&lt;STRONG&gt;Process_TIME\,URI\,Session_Key\,Services&lt;/STRONG&gt;&lt;SPAN&gt;,Hourly&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col1=APIDEV&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col2=4xs54&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col3=000916&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col4=DEV&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col5=Update&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col6=Integrate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col7=&lt;STRONG&gt;String\,Set\,Number\,ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col8=Standard&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col9=2024-07-10T23:10:45.001Z&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col10=&lt;STRONG&gt;Process_TIME\,URI\,Session_Key\,Services&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Col11=Hourly&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the case of Regex, what would be the Regex for this extraction within the props.conf.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 09:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/693009#M17974</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2024-07-11T09:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction with CSV File</title>
      <link>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/693026#M17975</link>
      <description>&lt;P&gt;If it is only Col7 and Col10 that could have escaped commas, try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;Col1&amp;gt;[^,]+),(?&amp;lt;Col2&amp;gt;[^,]+),(?&amp;lt;Col3&amp;gt;[^,]+),(?&amp;lt;Col4&amp;gt;[^,]+),(?&amp;lt;Col5&amp;gt;[^,]+),(?&amp;lt;Col6&amp;gt;[^,]+),(?&amp;lt;Col7&amp;gt;.+?(?&amp;lt;!\\)),(?&amp;lt;Col8&amp;gt;[^,]+),(?&amp;lt;Col9&amp;gt;[^,]+),(?&amp;lt;Col10&amp;gt;.+?(?&amp;lt;!\\)),(?&amp;lt;Col11&amp;gt;[^,]+)$&lt;/LI-CODE&gt;&lt;P&gt;You may have to double-up the backslashes&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;Col1&amp;gt;[^,]+),(?&amp;lt;Col2&amp;gt;[^,]+),(?&amp;lt;Col3&amp;gt;[^,]+),(?&amp;lt;Col4&amp;gt;[^,]+),(?&amp;lt;Col5&amp;gt;[^,]+),(?&amp;lt;Col6&amp;gt;[^,]+),(?&amp;lt;Col7&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col8&amp;gt;[^,]+),(?&amp;lt;Col9&amp;gt;[^,]+),(?&amp;lt;Col10&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col11&amp;gt;[^,]+)$&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 11 Jul 2024 09:50:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/693026#M17975</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-11T09:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction with CSV File</title>
      <link>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/693067#M17976</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you so much for sharing that with me. But it's not only for Col7 and Col10 all time. It might be within any Column and also # of Backslashes might not always be the same for the same Column. In that case how would I address that issue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 12:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/693067#M17976</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2024-07-11T12:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction with CSV File</title>
      <link>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/693073#M17977</link>
      <description>&lt;P&gt;The number of backslashes in the data doesn't matter, it is the number of backslashes in the regex string I was talking about. Backslashes normally need to be escaped (with a backslash), however, sometimes these backslashes have to be escaped as well, hence the need for 4 backslashes to represent a single backslash. Try something like this (which allows for escaped (backslashed) commas in all the columns).&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;Col1&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col2&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col3&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col4&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col5&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col6&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col7&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col8&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col9&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col10&amp;gt;.+?(?&amp;lt;!\\\\)),(?&amp;lt;Col11&amp;gt;.+?(?&amp;lt;!\\\\))$&lt;/LI-CODE&gt;&lt;P&gt;Again, it might be that you only need two backslashes each time instead of four.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 14:02:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Field-Extraction-with-CSV-File/m-p/693073#M17977</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-11T14:02:36Z</dc:date>
    </item>
  </channel>
</rss>

