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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Parse XML : error when get "NaN" value for insert in mysql Float field

Hi Everybody,
I'm really novice in Talend Open Studio. It's my first use, but I found lot of documentation about this great product !
I have lot of data as XML files (300Mo) for analyse, and I decided to insert it into a mySQL Database.
The row structure : 1 String, 1 Date, and many Number fields by row.
My architecture : tFileList > tFileInputXML > tMAP > mySQLTableOutput
Everything works good, but I have only one problem :
In the XML file, some "row" have "NaN" value for only some fields, so when Talend insert this row in mysql, mysql reject it, because of the "NaN" value is not a Float I guess.
So, my question is : How can I setup Talend to recognize "NaN" value as a "null" value, to convert it to a "null" or "0" value ?
Thanks for your help !
Dimix.
Labels (4)
3 Replies
Anonymous
Not applicable
Author

I thought about a "if" in the Map Field Expression ... ?
Anonymous
Not applicable
Author

I did that : (row1.FIELD.isNaN())?0:row1.FIELD
I don't know if it's the more efficient, but that's works !
janhess
Creator II
Creator II

Is it legitimate for your XML to contain non-numerical data?