dbTalk Databases Forums  

Dynamic SSIS Package to move data

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


Discuss Dynamic SSIS Package to move data in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jimdandy@shaw.ca
 
Posts: n/a

Default Dynamic SSIS Package to move data - 02-24-2006 , 04:22 PM






Is there an easy way to dynamically configure DataFlow tasks in your
package? For example, I'd like to be able to pass in a variable for the
name of the source and destination tables, and have the package read
the metadata for these tables in the dataflow task.

In DTS you could do this, but in SSIS I don't see an easy way to do it.

Thanks in advance.


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

Default Re: Dynamic SSIS Package to move data - 02-25-2006 , 02:04 PM






Hello jimdandy (AT) shaw (DOT) ca,


Sure you can do this to an extent. if the new source table and the destination
table no longer have the same metadata then everything will break. if they
have the same metadata then you should have a look at;

1. For table names. Setting the source table name through a variable (it
is an option on the source adapter)
2. For connection info (DB and Server). Look at property expressions on
the connection manager.




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

Quote:
Is there an easy way to dynamically configure DataFlow tasks in your
package? For example, I'd like to be able to pass in a variable for
the name of the source and destination tables, and have the package
read the metadata for these tables in the dataflow task.

In DTS you could do this, but in SSIS I don't see an easy way to do
it.

Thanks in advance.




Reply With Quote
  #3  
Old   
jimdandy@shaw.ca
 
Posts: n/a

Default Re: Dynamic SSIS Package to move data - 02-27-2006 , 01:05 PM



This is great. However, how are you suppose to make use of variable
names when the metadata is saved with the package? I don't undestand
the logic behind the use of variable names for the tables when the
metadata isn't updated automatically.

Would you create an eventhanlder for the preexecute event of the
dataflow task, then programmatically updated the metadata at runtime?

This seems like a fairly common and simple thing to do, but I don't
seen any real samples that would show you this actually works.

Thanks for your help.


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

Default Re: Dynamic SSIS Package to move data - 02-27-2006 , 02:13 PM



Hello jimdandy (AT) shaw (DOT) ca,

You cannot change the metadata of the data flow period. The metdata is sacred
and it is one of the characteristics that makes it so fast because memory
can be allocated correctly and the buffers sized accordingley.

The table name can be different but the columns and their metdata the same
as previous.




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

Quote:
This is great. However, how are you suppose to make use of variable
names when the metadata is saved with the package? I don't undestand
the logic behind the use of variable names for the tables when the
metadata isn't updated automatically.

Would you create an eventhanlder for the preexecute event of the
dataflow task, then programmatically updated the metadata at runtime?

This seems like a fairly common and simple thing to do, but I don't
seen any real samples that would show you this actually works.

Thanks for your help.




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.