dbTalk Databases Forums  

Variable pass to child package in SSIS

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


Discuss Variable pass to child package in SSIS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike Coffey
 
Posts: n/a

Default Variable pass to child package in SSIS - 05-18-2006 , 05:30 PM






I apologize if this question seems dumb, but I've looked at both the group
and the SSIS book and can't seem to find what I need.

I have a package that takes input files from clients and loads the data into
staging SQL 2K5 tables. I've set up the connection manager for each of the
six source files to use variable values for the connectionstring property, as
the book suggested. The first step in the package gets those values out of
an SQL table, then the load steps run. The key for that SQL table is a
customer number.

The parent package has a step that gets all the active customers, then uses
a ForEachLoop container to cycle through them and execute this package.

My two questions:

1) I cannot find anything in the Execute Package tasks that allows me to
specify the value for the customer number variable the child package will
use. How do I pass that value into the child?

2) How do I dynamically set the child package value so it executes the
development version when I'm testing new stuff and the production version
when it runs for the actual client stuff?

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

Default Re: Variable pass to child package in SSIS - 05-18-2006 , 05:43 PM






Hello Mike,

Ok So variables are different now. A child executable can see its parent's
variables.

Your child package can therefore see variables from the calling package (Scope
allowing)

If you want to set a child package property from a parent variable then have
a look at "Parent Package Variables"




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

Quote:
I apologize if this question seems dumb, but I've looked at both the
group and the SSIS book and can't seem to find what I need.

I have a package that takes input files from clients and loads the
data into staging SQL 2K5 tables. I've set up the connection manager
for each of the six source files to use variable values for the
connectionstring property, as the book suggested. The first step in
the package gets those values out of an SQL table, then the load steps
run. The key for that SQL table is a customer number.

The parent package has a step that gets all the active customers, then
uses a ForEachLoop container to cycle through them and execute this
package.

My two questions:

1) I cannot find anything in the Execute Package tasks that allows me
to specify the value for the customer number variable the child
package will use. How do I pass that value into the child?

2) How do I dynamically set the child package value so it executes the
development version when I'm testing new stuff and the production
version when it runs for the actual client stuff?




Reply With Quote
  #3  
Old   
Mike Coffey
 
Posts: n/a

Default Re: Variable pass to child package in SSIS - 05-19-2006 , 11:58 AM



That's the stuff -- thanks a million.

And without being cloying, the book is a tremendous resource, best I've
found out there. Kudos to you and your fellow authors.

"Allan Mitchell" wrote:

Quote:
Hello Mike,

Ok So variables are different now. A child executable can see its parent's
variables.

Your child package can therefore see variables from the calling package (Scope
allowing)

If you want to set a child package property from a parent variable then have
a look at "Parent Package Variables"




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

I apologize if this question seems dumb, but I've looked at both the
group and the SSIS book and can't seem to find what I need.

I have a package that takes input files from clients and loads the
data into staging SQL 2K5 tables. I've set up the connection manager
for each of the six source files to use variable values for the
connectionstring property, as the book suggested. The first step in
the package gets those values out of an SQL table, then the load steps
run. The key for that SQL table is a customer number.

The parent package has a step that gets all the active customers, then
uses a ForEachLoop container to cycle through them and execute this
package.

My two questions:

1) I cannot find anything in the Execute Package tasks that allows me
to specify the value for the customer number variable the child
package will use. How do I pass that value into the child?

2) How do I dynamically set the child package value so it executes the
development version when I'm testing new stuff and the production
version when it runs for the actual client stuff?





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.