Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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)
ie
Statement
(404)
(500)
(1200)
3200
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
Labels (2)
1 Reply
Anonymous
Not applicable
Author

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