What will be the best way to Extract the XML stored in a Table
Hello, What will be the best way to extract XML data saved in a Column of one table. The XML Data is big in size some time ~10MB and will be extracted into ~15 tables. I was thinking to use "XML Source" Data Flow component and use its "XML Data" property. So how can I have the column data (XML) assign to the XML Data here? Note: All XML in the column are of same schema and I have the schema stored in a share folder that SSIS can access. Also there may be many solutions, which I love to learn, but using the "XML Source" component (as asked above) will be good for me now, as the flow from another SSIS package is ready to reuse (which use similar XML, but form a folder/location). Thanks.
December 27th, 2010 2:09pm

use two data flow task, in first data flow, use an OLEDB Source and select the xml column from source table, then connect it to a RecordSet Destination, Note that you should set an OBJECT type package variable in recordset destination, so you should create this variable in package scope before this step, let's name this as AllDataVar , after configure it in recordset destination and map columns, back to control flow create new string type variable in package scope, let's name this as XMLDataVar add a foreach loop container, set enumerator as ado, and set AllDataVar as source variable, then in variable mapping tab, set variable as XMLDataVar and index as 0. in the foreach loop container add another data flow task , in the this data flow task, put an xml source, set source from variable, and set XMLDataVar as source variable, then set an oledb destination to any table you want to be as destination. note that you should set xsd schema in xml source appropriately. http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
December 27th, 2010 2:21pm

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

Other recent topics Other recent topics