One Star

Loading a XML file to MS SQL

Hello,
I am wondering if Talend provides a easy way to load a xml file to SQL server.
I am looking for a batch load like specifying a XML file and Talend parse the xml and load them into SQL database.
for example,
<root>
<element1>
<subelement1/>
<subelement2/>
</element1>
<element2>
<subelement1/>
<subelement2/>
</element2>
<element3>
<subelement1/>
<subelement2/>
</element3>
</root>
Element1,2 and 3 will become a table in the sql server.
so SQL create a element1,element2 and element3 table and insert its sub elements to table as a row.
Is there a component doing this kind of job?
Thank you in advance.
2 REPLIES
One Star

Re: Loading a XML file to MS SQL

Hi,
There's not one component that can do all of this. You already pointed out the steps you need to do :-
XML file and Talend parse the xml and load them into SQL database
Something like : fileXMLinput (parse out the XML)-> tmap (to split out fields you need into separate outputs) -> mysqloutput ( to load to mysql)
HTH
One Star

Re: Loading a XML file to MS SQL

Hi,
There's not one component that can do all of this. You already pointed out the steps you need to do :-
XML file and Talend parse the xml and load them into SQL database
Something like : fileXMLinput (parse out the XML)-> tmap (to split out fields you need into separate outputs) -> mysqloutput ( to load to mysql)
HTH

Knowing that there is no magic component for such job is a great help. I am new to Talend and locating a proper component is always a hard for me due to the lack of talend experience.
Your suggestion could be a good starting point. I appreciate your help.
Thanks,
Jong