Using the XML Source data flow object with one to many XML file
I am trying to use the SSIS XML Source object to insert data from an XML file into a relational database. Within the file and database there are several one to many relationships. For example, the Person table has a one to many relationship with the Phone table - one person can have multiple phone numbers. In my XML file, the PersonID is declared only once and that is with the person data. I need the PersonID as a foreign key for the phone data. The XML Source object displays multiple outputs for the XML file, including one each for Person and Phone. However the Phone output does not include the PersonID which is required to insert the data into the Phone table. How can I get the PersonID to appear with the Phone data? Is it a matter of modifying the XSD file, or is there method within SSIS where I can combine XML elements from different levels? Eric
October 22nd, 2010 8:59pm

The XML Source creates an additional ID column for each child output that relates the parent to the child. Normally, the column is named [ParentOutputName]_ID. You can use that to relate the data.John Welch | www.varigence.com | www.agilebi.com | ssisUnit.codeplex.com
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2010 9:23pm

That was the solution. Thanks John.
October 23rd, 2010 4:22am

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

Other recent topics Other recent topics