Importing XML files into SQL Table
Hi Scholars, I need some help on importing data from complex XML files into a SQL table in SSIS: I was able to achieve this with a few XML files, which had a joining condition between different segments of an XML file. (As the XML file when browsed into an 'XML Source' of Data Flow Task, it shows up as different tables with some joining criteria on Id's). But, for a few XML files I don't see any joining Id's between segments. I did some research in blogs and was suggested to use XSLT in 'XML Task' of Control Flow, followed by a Data Flow Task. But, I'm not sure how XML file can be transformed to XSLT. Can any one please help me out here. Thanks Kranthi Gummula
September 12th, 2012 1:36pm

Yes you can do that with XML Task and XSLT as operation. this is an example of flattening xml with XSLT: http://www.rad.pasfu.com/index.php?/archives/21-XML-Task-Changing-Style-of-Data-XSLT.html You can also learn XSLT in few hours because it is very simple, this is good reference to learn XSLT: http://www.w3schools.com/xsl/http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
September 12th, 2012 4:45pm

Hi Reza Raad and ArthurZ, Thanks for your answer. Now, I will start learning XSLT. Jut out of curiosity, a question for you guys: When XML file browsed into 'XML Source' of Data Flow Task, I could see these extra Id columns (for joining) along with the regular columns in each segment. But, Why don't I see them when I open the XML file in BIDS? Thanks Kranthi Gummula
September 13th, 2012 10:51am

Hi Reza Raad and ArthurZ, Thanks for your answer. Now, I will start learning XSLT. Jut out of curiosity, a question for you guys: When XML file browsed into 'XML Source' of Data Flow Task, I could see these extra Id columns (for joining) along with the regular columns in each segment. But, Why don't I see them when I open the XML file in BIDS? Thanks Kranthi Gummula
Free Windows Admin Tool Kit Click here and download it now
September 13th, 2012 10:51am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics