Solved

Loading XML into table with SSIS

Posted on 2012-03-28
3
316 Views
Last Modified: 2012-04-07
Good morning,
I have been given an XML file and XSD that I need to load into a relational table structure.   I am fairly new to working with both XML and SSIS, but I have setup an XML source and an ADO.NET destination.   When I use the XML Source Editor and look at the "Columns", I see numerous output names.   I was not expecting this since the XML records themselves are mostly non-hierarchical.   However, I noticed that there is something different in some of my XML elements and those elements are showing up as different outputs.  

Many of my XML elements look like normal:
<Description>Test</Description>

But some have an additional parameter:
<ACTIVEFLAG code="0">No</ACTIVEFLAG>

Any element that has this code="0" or similar code= reference is being setup as a separate output.    I really only want the "No" value for the ACTIVEFLAG element.  I don't need the code value (which I assume is an alternative value for the element).   Is there a way to tell SSIS to ignore the code= and hopefully reduce the number of outputs that are being created?

This is the smallest of my XML files that I need to convert and there are over 90 outputs generated by the XML Source Editor.   My intent was to use a MERGE JOIN to bring elements together if needed, but that would be unmanageable with 90 outputs.

Ideas?

Thank you!
John
0
Comment
Question by:jzlamal
  • 2
3 Comments
 
LVL 39

Expert Comment

by:lcohan
ID: 37778215
Please see my answer at link below and hope it helps you as well - you can ndo it by running a SQL stored proc:

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_26951210.html?cid=1131#a35378977
0
 

Accepted Solution

by:
jzlamal earned 0 total points
ID: 37795750
I found that by altering the XSD (schema definition) and changing it from a complex type to a simple type, the "code" parameter would be ignored.
0
 

Author Closing Comment

by:jzlamal
ID: 37818632
I really didn't get a response that resolved my particular situation.   I went ahead and experiemented until I found the answer.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now