all groups > sql server dts > february 2006 >
You're in the

sql server dts

group:

Dynamic SSIS Package to move data


Dynamic SSIS Package to move data jimdandy NO[at]SPAM shaw.ca
2/24/2006 2:22:13 PM
sql server dts: 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.
Re: Dynamic SSIS Package to move data Allan Mitchell
2/25/2006 12:04:49 PM
Hello jimdandy@shaw.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

[quoted text, click to view]

Re: Dynamic SSIS Package to move data jimdandy NO[at]SPAM shaw.ca
2/27/2006 11:05:24 AM
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.
Re: Dynamic SSIS Package to move data Allan Mitchell
2/27/2006 12:13:37 PM
Hello jimdandy@shaw.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

[quoted text, click to view]

AddThis Social Bookmark Button