
Anonymous
Not applicable
2009-06-23
11:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[TOS 3.0.4] problem when importing xml CDATA to mysql
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>
<!]>
</product_key>
and
<station_libelle>
<!]>
</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
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>
<!]>
</product_key>
and
<station_libelle>
<!]>
</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
189 Views
2 Replies

Anonymous
Not applicable
2009-06-24
12:21 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Set the data type as string and use the method provided by Talend,
StringHandling.TRIM(String s)
see my screenshot
Best regards
shong
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
189 Views

Anonymous
Not applicable
2009-06-24
05:13 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks a lot for your help.
Best regards.
Jérôme
Thanks a lot for your help.
Best regards.
Jérôme
189 Views
