<?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: How to extract fields from csv file? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-extract-fields-from-csv-file/m-p/482600#M7806</link>
    <description>&lt;P&gt;&lt;EM&gt;transforms.conf&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DELIMS = &amp;lt;quoted string list&amp;gt;
* NOTE: This setting is only valid for search-time field extractions.
* IMPORTANT: If a value may contain an embedded unescaped double quote
  character, such as "foo"bar", use REGEX, not DELIMS. An escaped double
  quote (\") is ok. Non-ASCII delimiters also require the use of REGEX.
* Optional. Use DELIMS in place of REGEX when you are working with ASCII-only
  delimiter-based field extractions, where field values (or field/value pairs)
  are separated by delimiters such as colons, spaces, line breaks, and so on.
* Sets delimiter characters, first to separate data into field/value pairs,
  and then to separate field from value.
* Each individual ASCII character in the delimiter string is used as a
  delimiter to split the event.
* Delimiters must be specified within double quotes (eg. DELIMS="|,;").
  Special escape sequences are \t (tab), \n (newline), \r (carriage return),
  \\ (backslash) and \" (double quotes).
* When the event contains full delimiter-separated field/value pairs, you
  enter two sets of quoted characters for DELIMS:
* The first set of quoted delimiters extracts the field/value pairs.
* The second set of quoted delimiters separates the field name from its
  corresponding value.
* When the event only contains delimiter-separated values (no field names),
  use just one set of quoted delimiters to separate the field values. Then use
  the FIELDS setting to apply field names to the extracted values.
  * Alternately, Splunk software reads even tokens as field names and odd
    tokens as field values.
* Splunk software consumes consecutive delimiter characters unless you
  specify a list of field names.
* The following example of DELIMS usage applies to an event where
  field/value pairs are separated by '|' symbols and the field names are
  separated from their corresponding values by '=' symbols:
    [pipe_eq]
    DELIMS = "|", "="
* Default: ""
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 25 Feb 2020 13:30:54 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-02-25T13:30:54Z</dc:date>
    <item>
      <title>How to extract fields from csv file?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-extract-fields-from-csv-file/m-p/482599#M7805</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;We use a python script to export some data every 24 hours from our database and save it in  &lt;CODE&gt;$SPLUNK_HOME/etc/apps/SplunkEnterpriseSecuritySuite/lookups&lt;/CODE&gt; folder in  &lt;CODE&gt;.csv&lt;/CODE&gt; format. For some reason Splunk can't recognise  &lt;CODE&gt;;&lt;/CODE&gt; as a delimiter, so we have a lookup with a single field like below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;name;ip;os;environment
wks123;192.168.0.1;windows 10;production
srv456;192.168.0.2;widows 2016;test
etc.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;At the same time when we create a new lookup file based on the same  &lt;CODE&gt;.csv&lt;/CODE&gt; file via Lookup Editor add-on it works perfectly fine.&lt;/P&gt;

&lt;P&gt;Could you please help as to set up a delimiter for our original  &lt;CODE&gt;.csv&lt;/CODE&gt; file in Splunk configuration?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 10:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-extract-fields-from-csv-file/m-p/482599#M7805</guid>
      <dc:creator>woodentree</dc:creator>
      <dc:date>2020-02-25T10:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from csv file?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-extract-fields-from-csv-file/m-p/482600#M7806</link>
      <description>&lt;P&gt;&lt;EM&gt;transforms.conf&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DELIMS = &amp;lt;quoted string list&amp;gt;
* NOTE: This setting is only valid for search-time field extractions.
* IMPORTANT: If a value may contain an embedded unescaped double quote
  character, such as "foo"bar", use REGEX, not DELIMS. An escaped double
  quote (\") is ok. Non-ASCII delimiters also require the use of REGEX.
* Optional. Use DELIMS in place of REGEX when you are working with ASCII-only
  delimiter-based field extractions, where field values (or field/value pairs)
  are separated by delimiters such as colons, spaces, line breaks, and so on.
* Sets delimiter characters, first to separate data into field/value pairs,
  and then to separate field from value.
* Each individual ASCII character in the delimiter string is used as a
  delimiter to split the event.
* Delimiters must be specified within double quotes (eg. DELIMS="|,;").
  Special escape sequences are \t (tab), \n (newline), \r (carriage return),
  \\ (backslash) and \" (double quotes).
* When the event contains full delimiter-separated field/value pairs, you
  enter two sets of quoted characters for DELIMS:
* The first set of quoted delimiters extracts the field/value pairs.
* The second set of quoted delimiters separates the field name from its
  corresponding value.
* When the event only contains delimiter-separated values (no field names),
  use just one set of quoted delimiters to separate the field values. Then use
  the FIELDS setting to apply field names to the extracted values.
  * Alternately, Splunk software reads even tokens as field names and odd
    tokens as field values.
* Splunk software consumes consecutive delimiter characters unless you
  specify a list of field names.
* The following example of DELIMS usage applies to an event where
  field/value pairs are separated by '|' symbols and the field names are
  separated from their corresponding values by '=' symbols:
    [pipe_eq]
    DELIMS = "|", "="
* Default: ""
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Feb 2020 13:30:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-extract-fields-from-csv-file/m-p/482600#M7806</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-25T13:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from csv file?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-extract-fields-from-csv-file/m-p/482601#M7807</link>
      <description>&lt;P&gt;Thanks for the help, but it still seems unclear for me. Could you please provide an example or develop your answer.&lt;BR /&gt;
Many thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 15:30:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-extract-fields-from-csv-file/m-p/482601#M7807</guid>
      <dc:creator>woodentree</dc:creator>
      <dc:date>2020-02-25T15:30:51Z</dc:date>
    </item>
  </channel>
</rss>

