Wednesday, 16 September 2020

Parent Child Package Configuration in SSIS

Package configuration is nothing but the way to provide the variable value without editing the package externally.

Read other type of configuration in SSIS

XML Configuration file & SQL server:

https://bageshkumarbagi-msbi.blogspot.com/2014/12/package-configuration.html

Environment variable:

https://bageshkumarbagi-msbi.blogspot.com/2020/09/ssis-package-configuration-using_12.html

Registry Entry:

https://bageshkumarbagi-msbi.blogspot.com/2020/09/ssis-package-configuration-using.html

 The Parent Package Variable configuration is a way of passing values from parent to child packages. The configuration is built on the child package and uses a variable in the parent package. The configuration is mapped to a variable in the child package, or to the property of an object in the child package.

In this demo, we will show, how we can use the parent package configuration.

Here we are creating a parent package and child package.

File example: 

The table where we are loading theses files data

                                       
We have created a child package to load the csv file.  

Now we are creating the parent package where we are taking the Foreach loop container and iterating the files and inside the Foreach loop container, we are taking the Execute package task to call the child package.

  

Configuring Foreach loop container as file enumerate

                                        

Storing this file name to a variable.

                                         

Inside the loop, we are taking the execute package task and call the child package.  

Now come to the child package.

Creating a variable to receive the parent package variable value.

   

In the child package we are creating the Flat file connection manager dynamically using expression.    

Click ok.

Now right click child package and creating the parent package configuration.

  

Click next

                                  

Click next

  

And click finish.

Now the package is ready to run.

Parent package:  

Child package

  

Before the execution of this package.

Records in the table.

  

Now running the Parent package

The package executed successfully.

  

See the records in the table.

                                       
Hope this will help to understand the parent package configuration.

Popular Posts