<?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: Importing CSV files with numbers formatted in German localization (ex: 1.3400,39), how to configured SEDCMD in props.conf to switch commas and decimal points? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231355#M45052</link>
    <description>&lt;P&gt;Thanks for the Link, sundareshr. My approach would be something like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf:
[someSourcetype]
TRANSFORMS-first = NoHeader
TRANSFORMS-second= csv-fieldextraction

transforms.conf:
[NoHeader]
REGEX = "Time","IOPS","Latency(ms)","BW (MBps)"
DEST_KEY = queue
FORMAT = nullQueue

[csv-fieldextraction]
DELIMS=","
FIELDS="Time","IOPS","Latency","BW (MBps)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Still, the configuration is bond to a specific set of fields. Did you mean that or do you have something different in mind?&lt;/P&gt;</description>
    <pubDate>Mon, 21 Dec 2015 15:18:53 GMT</pubDate>
    <dc:creator>benjaminruland</dc:creator>
    <dc:date>2015-12-21T15:18:53Z</dc:date>
    <item>
      <title>Importing CSV files with numbers formatted in German localization (ex: 1.3400,39), how to configured SEDCMD in props.conf to switch commas and decimal points?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231349#M45046</link>
      <description>&lt;P&gt;Hey everybody,&lt;/P&gt;

&lt;P&gt;We recently got the request to import CSV files into Splunk. However, the files include some number formatted with German localizations, such that decimal points and commas are exchanged. This is a common number then: &lt;CODE&gt;1.340.000,39&lt;/CODE&gt;. Such a number would now be interpreted as String in Splunk.&lt;/P&gt;

&lt;P&gt;I saw some guys having similar problems, but not a solution without fixing the problems in search.&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/52965/splunk-and-localization-of-numbers.html"&gt;http://answers.splunk.com/answers/52965/splunk-and-localization-of-numbers.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/42814/decimal-how-to-use-vs.html"&gt;http://answers.splunk.com/answers/42814/decimal-how-to-use-vs.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I tried my best and implemented some SEDCMD to remove points in numbers and replace commas with points, but it seems like they are getting executed on _raw after the CSV-fields were already excluded.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Is there a way to move the SEDCMDs before CSV-extraction or to make Splunk aware of different-localized numbers?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;My props.conf is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[csv-test]
SEDCMD-1-removePoints = s/([0-9])\.([0-9])/\1\2/g
SEDCMD-2-decimalToPoint = s/([0-9])\,([0-9])/\1.\2/g
INDEXED_EXTRACTIONS = csv
KV_MODE = none
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
CHARSET = Latin-1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for your kind help,&lt;BR /&gt;
Benjamin&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 15:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231349#M45046</guid>
      <dc:creator>benjaminruland</dc:creator>
      <dc:date>2015-09-18T15:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV files with numbers formatted in German localization (ex: 1.3400,39), how to configured SEDCMD in props.conf to switch commas and decimal points?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231350#M45047</link>
      <description>&lt;P&gt;Hi Benjamin,&lt;/P&gt;

&lt;P&gt;I have the same probleme. At the moment a have to do a rex on every field I want to use and then convert it:&lt;BR /&gt;
    | rex field="FieldA" mode=sed "s/,/./"&lt;BR /&gt;
    | rex field="FieldB" mode=sed "s/,/./"&lt;BR /&gt;
    | convert num(Field*) | eval SumFields=FieldA+FieldB&lt;/P&gt;

&lt;P&gt;Perhaps there is at least a way to reduce number of regex' needed, because I have many fields and they vary...&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
Thomas&lt;/P&gt;</description>
      <pubDate>Sun, 13 Dec 2015 01:00:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231350#M45047</guid>
      <dc:creator>goelli</dc:creator>
      <dc:date>2015-12-13T01:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV files with numbers formatted in German localization (ex: 1.3400,39), how to configured SEDCMD in props.conf to switch commas and decimal points?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231351#M45048</link>
      <description>&lt;P&gt;Try removing &lt;CODE&gt;INDEXED_EXTRACTIONS&lt;/CODE&gt; from your &lt;CODE&gt;props.conf&lt;/CODE&gt; and field extraction rules to &lt;CODE&gt;props&lt;/CODE&gt; &amp;amp; &lt;CODE&gt;transforms&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Dec 2015 03:19:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231351#M45048</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2015-12-13T03:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV files with numbers formatted in German localization (ex: 1.3400,39), how to configured SEDCMD in props.conf to switch commas and decimal points?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231352#M45049</link>
      <description>&lt;P&gt;That is worth a try.&lt;/P&gt;

&lt;P&gt;In that case, however, I need to provide the column headings of my csv for Splunk do recognize the fields, right?&lt;BR /&gt;
That was my intention to use INDEXED_EXTRACTIONS.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 12:51:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231352#M45049</guid>
      <dc:creator>benjaminruland</dc:creator>
      <dc:date>2015-12-21T12:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV files with numbers formatted in German localization (ex: 1.3400,39), how to configured SEDCMD in props.conf to switch commas and decimal points?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231353#M45050</link>
      <description>&lt;P&gt;Thats a good point. If so, it would not work for me because my field vary much...&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 13:56:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231353#M45050</guid>
      <dc:creator>goelli</dc:creator>
      <dc:date>2015-12-21T13:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV files with numbers formatted in German localization (ex: 1.3400,39), how to configured SEDCMD in props.conf to switch commas and decimal points?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231354#M45051</link>
      <description>&lt;P&gt;If you choose to removed &lt;CODE&gt;INDEXED_EXTRACTIONS&lt;/CODE&gt; you will also have to remove the "header" row from _raw and do `multiple field extraction. See here for details/ideas&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 14:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231354#M45051</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2015-12-21T14:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV files with numbers formatted in German localization (ex: 1.3400,39), how to configured SEDCMD in props.conf to switch commas and decimal points?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231355#M45052</link>
      <description>&lt;P&gt;Thanks for the Link, sundareshr. My approach would be something like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf:
[someSourcetype]
TRANSFORMS-first = NoHeader
TRANSFORMS-second= csv-fieldextraction

transforms.conf:
[NoHeader]
REGEX = "Time","IOPS","Latency(ms)","BW (MBps)"
DEST_KEY = queue
FORMAT = nullQueue

[csv-fieldextraction]
DELIMS=","
FIELDS="Time","IOPS","Latency","BW (MBps)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Still, the configuration is bond to a specific set of fields. Did you mean that or do you have something different in mind?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 15:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Importing-CSV-files-with-numbers-formatted-in-German/m-p/231355#M45052</guid>
      <dc:creator>benjaminruland</dc:creator>
      <dc:date>2015-12-21T15:18:53Z</dc:date>
    </item>
  </channel>
</rss>

