One Star

decimal separator

hi,
I am reading a FileDelimited file and there are values as 2345,56 with french separator "," instead "."
does it exist a facility or options to compute these values ?
thanks for your tips
Tags (1)
4 REPLIES
Employee

Re: decimal separator

Perl component tReplace was introduced in TOS 2.2.0M2 (see 1348)
One Star

Re: decimal separator

thanks for the answer but if possible, I want to preserve my old and very stable 2.1 :-)
Since my issue is very basic, I have tried a small piece of code like:
($row1 =~ s/,/./) * 100.00
but it does not work :-(
is it possible to have an expression to fix the issue ?
One Star

Re: decimal separator

found :-)
(($row1 =~s/,/./)?100:100) * $row1
thanks a lot
Employee

Re: decimal separator

Hi,
You can use the tReplace component with TOS 2.1 since it is available in the ecosystem as an extension : http://www.talendforge.org/ext/extension_view.php?eid=22
You only have to download and unzip the file in your User components folder (defined in Window/Preferences/Talend/Components ) and reload TOS.