Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an error that i don't unterstand :
I did : a fileInputExcel => tMap => tfileOutputExcel.
I wanted retrieve a column with pourcentages (with a single line to unterstand the error : header : 5 Limit : 1)
Then, in tMap, I put Pourcentage in String because in log console, it indicates the error For input : String. At the beginning, I put in Double and also in Float.
I run the job :
Normally, I should have : 0,47 (or 0,468). From where goes out 4.475? 4.7? 0.8?
There is a single line....
Thanks in advance !
I have a suspicion that your system settings are wrong for the data you are working with.
Can you run this code in a tJava in a blank Talend job and show us what you get?....
java.text.DecimalFormat decFormat = new java.text.DecimalFormat();
java.text.DecimalFormatSymbols decSymbols = decFormat.getDecimalFormatSymbols();
System.out.println("Decimal separator is : " + decSymbols.getDecimalSeparator());
System.out.println("Thousands separator is : " + decSymbols.getGroupingSeparator());
Right, that is your cause. Your values are read as Strings with a "." as the decimal separator, but your system is expecting to convert using "," as the decimal separator.
You are right. i check in advanced settings on the fileinputexcel :
Thousands Separator : ""
Decimal Separator : "." instead of ",".
And i put all columns in string
And Bingo ! It works!
phew!