Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an excel input file which has number types such as : 45,34 or 1916.
I have : tfileinput >>>>> tmap >>>>>> tfileoutput. So in the schema i put the column type "integer " in the input/tmap/output.
I want my output of this column in integer. Its all working good except for 1000+ number, they are not written. Why? 999,99 is working but 1111 is not. In the console I have this kind of error, in red : " For input string: "1,916"? But in my input I dont have any "," except for the decimal... Help?
Hi,
Could you please add a replace all function to remove all commas before passing to the tconverttype?
Its working fine when the data is reaching in cleansed numerical format. Please see the screenshot below where input is string but output is integer.
Warm Regards,
Nikhil Thampi
Hello @nthampi, thanks for your time !
Actually, I have to keep the comma ! Maybe I should explain myself better.
My input column looks like :
And format is " number " on my excel sheet.
I want it in my input as number or integer what ever. But from now on, in my output I only have 334 & 78. I just tried "TconvertType" components but have the same error : " For input string: "1,916"
@daez,since i suggest you to read first that column as string and remove that "," and the convert sting to integer.
row1.col.replace(',','')
Here you go! You can use below function to clear all the commas. Please refer both input and out in below screen shots and component details.
row1.input.replaceAll(",","")
Could you please mark the topic as resolved since your query is answered? Kudos are also welcome 🙂
Warm Regards,
Nikhil Thampi
I agree with @manodwhb.
I added tConvertType to give a better graphical representation 🙂
Warm Regards,
Nikhil Thampi
@daez,still do you have this issue?