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

One Star

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.
One Star

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

I thought about a "if" in the Map Field Expression ... ?
One Star

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

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

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

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