This Blog is very much useful for the Fresher BI as well as Exp BI Professionals

Sunday, December 22, 2013

How can we call Variable Values from Parent Package to Child in SSIS?

First we need to create two packages, one named Master, and another named child. Then we will create a string variable named "strValue". In the parent package we will provide the value of variable is "Parent". We will pass this value to the child package. In the Child package we will provide the value of variable is "Child”, which will be replace by the parent package.

Master Package:-
the Execute Package task in the Master Package and configure it for browsing to Child Package.

Then go the Child Package, we need to use the Package Configuration by right clicking on Control flow task.  Select the Parent Package Variable as a Configuration type. In the Parent Variable field enter the “strValue", this was the name of the variable we created on the parent package, then click next.


Click on the plus next to the "strValue" variable and then the plus next to the properties folder under it. Then click on value so it is highlighted. This tells SSIS where to copy the value of the parent variable. Click next and finish.
To see the value of parent package variable in Child package.
Add the script task on Child package to show the value of master package value



This will cause a popup box to appear showing the value of the variable. The value will be parent if you run the parent package. The value will be child if you run the child package alone.


No comments:

Post a Comment