As I wrote in my previous post , complex XML documents will produce multiple outputs when you're using the XML Source adapter. Most of the time it will be easier to pre-process your source file with XSLT to de-normalize it a bit. Reducing the number of outputs greatly simplifies your data flow.
Let's take the same XML document I used in the last example:
We want to flatten this out a bit using an XSL transform like this one (forgive my novice XSLT skills):
We'll apply the transform with an XML Task. Add one to your package, and open the editor. You'll want to change the Operation Type property to XSLT, set SaveOperationResult to true, and set all of the file connections.
Note, the Source should be your XML source document and the SecondOperand is your XSLT document.
The processed XML looks like this:
Add a Data Flow Task, and setup your XML source to use the processed XML document. You'll need to update/regenerate the schema for your document to account for the new format. Notice there is now only one output to deal with.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.