negative number surrounded by parenthesis

One Star

negative number surrounded by parenthesis

Hi All,
I would like to know if there's a way for talend by default import as negative number what comes surrounded in parenthesis?
For instance, a file containing a columns as statement with some positive and negatives numbers (round brackets)
If use this file to get the schema, this column will be recognized as STRING not as INTEGER/DOUBLE/FLOAT and if it's needed to make calculations, like sum, avg, etc Talend raise errors (NumberFormatException), due all values surrounded by parenthesis not be converted by negative numbers (ie. (404) = -404).
I did a trick into my job, creating a routine to convert round brackets negative numbers to numbers with minus sign, but would I to know if there is a way for Talend to do that by default?

Thnanks in Advanced,

Rodrigo A. Gomes
Five Stars

Re: negative number surrounded by parenthesis

I think you've taken the correct approach by writing a custom routine to perform the conversion.