Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Import Multiple XML files into Sql Server using SSIS Expand / Collapse
Author
Message
Posted Tuesday, January 26, 2010 4:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 24, 2014 1:41 AM
Points: 6, Visits: 81
Hello All...
I have a set of XML files which I need to import into database on Regular basis(after validating some business logic).

I want this to be a scheduled Job in database

Hence started creating an SSIS package to import the XML data into Database table.

I tried the SSIS package with a single XML and it worked very well

I am using Data Flow section with XML Source and Sql Server Destination tools init.


I am just selecting an XML in the XML Source and genenerating an XSD and doing the import process by connect XML source to Sql Server Destination

How can I make this process generic, so that works for all the list of XML files stored in a perticluar location on my server.

Please help me with the steps

Thanku in advance
Post #854028
Posted Wednesday, January 27, 2010 2:07 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, March 19, 2013 4:38 AM
Points: 1,078, Visits: 536
Fairly sure you will be able to adapt the method for importing multiple files shown here
http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx
provided that the definition of the xml files are the same and that they are all saved into the same folder.

Basically a for each container with you dataflow inside it, that loop through a folder and get the file name which is then passed to the xml source component
Post #854232
Posted Thursday, May 3, 2012 4:40 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 18, 2014 3:17 AM
Points: 152, Visits: 80
Hi There,

The process for loading .csv files or .txt files is pretty much clear.
But the process to load xml files is a bit confusing since I can't use Flat File Connection manager to get the data from .xml files and to set the Connection String proprty.
Please give me the detailed process to load the .xml files into db using For Each Loop container in SSIS.
Please reply if I am not elaborative about the problem.

Thanks,
Srinivas
Post #1294474
Posted Friday, July 27, 2012 1:41 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, September 11, 2012 1:09 PM
Points: 7, Visits: 175
Hey Sultan,

Did you figure out how to XML files? I am having the same requirement now.
Even I am confused as to how to map the variable in FELC as there is no conn str unlike flatfile or Eccel.

Please share your experience.
Post #1336758
Posted Wednesday, October 3, 2012 6:41 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, February 22, 2013 9:22 AM
Points: 63, Visits: 224
I'm having the same issue, anybody.
Post #1367629
Posted Thursday, November 15, 2012 7:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 15, 2012 9:30 PM
Points: 1, Visits: 4
It seems that importing multiple XML files is a common problem. I need help as well. Anyone out there that can help. Please.....
Post #1385160
Posted Thursday, November 15, 2012 7:40 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 15, 2012 7:33 PM
Points: 9, Visits: 0




Post #1385422
Posted Monday, July 15, 2013 9:27 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, February 11, 2014 2:53 PM
Points: 1, Visits: 17
I suppose this thread is not so current, but as I just worked on this I can share the following:

Indeed, there is no separate Connection Manager to edit.

But there is a property for both the xml file path and the xsd file path on the parent Data Flow Task itself.

You can set the Expression for both of those in the Expressions for the Data Flow Task in the same way as you do the Connection String for a Flat File Source.
Post #1473723
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse