Solved

Loading XML into table with SSIS

Posted on 2012-03-28
3
314 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

17 Experts available now in Live!

Get 1:1 Help Now