You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hi,
I need to import into a mysql database an xml file in which every data, numerical or textual, is inside a CDATA tag, for example:
<product_key>
<![CDATA[301]]>
</product_key>
and
<station_libelle>
<![CDATA[Alpe d'Huez]]>
</station_libelle>
I have found no good solution to do this. If the data is numerical, when I create a file xml metadata in the repository and indicate the type as numerical I will get an error at the execution of a basic job using file_xml_input and mysql_output, "wrong type". If I indicate the type as string there is no error but the CDATA is deleted and replaced by spaces and \n, so I need to clean the datas in mysql using trim and replace functions.
Is there a way to do a clean import directly in Talend ?
Thanks in advance for your help
Jérôme
Offline
Hello
Is there a way to do a clean import directly in Talend ?
Set the data type as string and use the method provided by Talend,
StringHandling.TRIM(String s)
see my screenshot
Best regards
shong
Offline
Hi,
Thanks a lot for your help.
Best regards.
Jérôme
Offline
Pages: 1