dbTalk Databases Forums  

SSIS using the XML source adapter to process different XML files

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS using the XML source adapter to process different XML files in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sara Nortrup
 
Posts: n/a

Default SSIS using the XML source adapter to process different XML files - 04-07-2006 , 11:39 AM






I am trying to build a generic ssis package that can process xml files
in a directory. Each xml file has a different schema, which is part of
the xml file. I am using the access mode: XML file from variable and
using inline schema. In design mode I have to actually point the
variable to a valid and existing xml file. During runtime I am
dynamically populating the variable. When the package goes to process a
new XML file with a different schema from the one used in design time it
fails. Is there a way to accomplish this without writing a custom source
component??



*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #2  
Old   
Simon Sabin
 
Posts: n/a

Default Re: SSIS using the XML source adapter to process different XML files - 04-09-2006 , 02:53 AM






Unfortunately not.

The Core to SSIS is that the buffers i.e. the columns in a data flow are
defined at design time. In your situation you want to be able to change
these at runtime, which isn't possible.

Your best solution is to design a flow for each type of schema and then
identify the schema in the loop and ecxecute the relevant data flow

--
Simon Sabin
SQL Server MVP
http://sqljunkies.com/weblog/simons

"Sara Nortrup" <meredith_sara (AT) hotmail (DOT) com> wrote

Quote:
I am trying to build a generic ssis package that can process xml files
in a directory. Each xml file has a different schema, which is part of
the xml file. I am using the access mode: XML file from variable and
using inline schema. In design mode I have to actually point the
variable to a valid and existing xml file. During runtime I am
dynamically populating the variable. When the package goes to process a
new XML file with a different schema from the one used in design time it
fails. Is there a way to accomplish this without writing a custom source
component??



*** Sent via Developersdex http://www.developersdex.com ***



Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: SSIS using the XML source adapter to process different XML files - 04-09-2006 , 04:24 PM





Just to add to what Simon has said. Even if you were to write a custom source
adapter that read the file at runtime and then managed to produce an output
that represented the changed XML file you would also need to change the downstream
components at runtime to recognise the new output as they would still be
bound to the old metadata.




Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Unfortunately not.

The Core to SSIS is that the buffers i.e. the columns in a data flow
are defined at design time. In your situation you want to be able to
change these at runtime, which isn't possible.

Your best solution is to design a flow for each type of schema and
then identify the schema in the loop and ecxecute the relevant data
flow

"Sara Nortrup" <meredith_sara (AT) hotmail (DOT) com> wrote in message
news:u9ZwTHmWGHA.4212 (AT) TK2MSFTNGP03 (DOT) phx.gbl...

I am trying to build a generic ssis package that can process xml
files in a directory. Each xml file has a different schema, which is
part of the xml file. I am using the access mode: XML file from
variable and using inline schema. In design mode I have to actually
point the variable to a valid and existing xml file. During runtime I
am dynamically populating the variable. When the package goes to
process a new XML file with a different schema from the one used in
design time it fails. Is there a way to accomplish this without
writing a custom source component??

*** Sent via Developersdex http://www.developersdex.com ***




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.