Monday, March 17, 2014

Advanced Execute Package Task

Task Factory Advanced Execute Package Task

The Advanced Execute Package Task provides a way for you to execute a child package from your SSIS package as well as passing and retrieving variables to and from the child package.

Feature Highlights

  • Can be used to execute child packages on a file system or within SQL Server
  • Can be used with password protected packages
  • Allows for variables to be mapped from the parent package to be used in the child package
  • Allows for the reading of variables from child packages to be used in your package
Advanced Execute Package Task

Advanced Execute Package Task- Step 1
The Advanced Execute Package task is used to execute child packages within an SSIS Package from either a local file or a package stored on SQL Server. A unique feature of the Advanced Execute Package is that the ability to map variables between the executing package and the child package.
The Advanced Execute Package task is used to execute child packages within an SSIS Package from either a local file or a package stored on SQL Server. A unique feature of the Advanced Execute Package is that the ability to map variables between the executing package and the child package.

Advanced Execute Package Task- Step 2
Setting up the Child Packages 
Child Package Location - There are two choice for choosing a child package location
  • File System - A local file on the executing machine
  • SQL Server - Package stored in SQL Server
Setting up the Child Packages 
Child Package Location - There are two choice for choosing a child package location
  • File System - A local file on the executing machine
  • SQL Server - Package stored in SQL Server

Advanced Execute Package Task- Step 3
Child Package Path - Depending on the selection made for the Child Package Location, the Package Path will point to either a local file or the path where the package is stored in SQL Server. Clicking the ellipsis button will either show a File Browser (File System mode) or our built in SQL Server Browser (SQL Server mode).
Password - If the child package is password protected, this is where you can enter the password.
Child Package Path - Depending on the selection made for the Child Package Location, the Package Path will point to either a local file or the path where the package is stored in SQL Server. Clicking the ellipsis button will either show a File Browser (File System mode) or our built in SQL Server Browser (SQL Server mode).
Password - If the child package is password protected, this is where you can enter the password.

Advanced Execute Package Task- Step 4
Variable Mappings
You have three options for mapping variables from your package to the child package called Assignment Directions.
  1. Read variable from child package - This mapping direction will read the value of the variable selected in the "Child Package Variable" and assign the value to the variable selected in the "Parent Package Variable". The value of the variable will read after execution of the child package has occurred. 
  2. Write variable to child package - This mapping direction will write the variable value selected in "Parent Package Variable" and assign the value to the variable selected in the "Child Package Variable". The value of the variable will be written before execution of the child package.
  3. Read and write variable from child package - This mapping direction will both write the variable value selected in "Parent Package Variable" and assign the value to the variable selected in the "Child Package Variable" before execution occurs and then will read the value of the variable selected in the "Child Package Variable" and assign the value to the variable selected in the "Parent Package Variable" after execution has occurred.
Variable Mappings
You have three options for mapping variables from your package to the child package called Assignment Directions.
  1. Read variable from child package - This mapping direction will read the value of the variable selected in the "Child Package Variable" and assign the value to the variable selected in the "Parent Package Variable". The value of the variable will read after execution of the child package has occurred. 
  2. Write variable to child package - This mapping direction will write the variable value selected in "Parent Package Variable" and assign the value to the variable selected in the "Child Package Variable". The value of the variable will be written before execution of the child package.
  3. Read and write variable from child package - This mapping direction will both write the variable value selected in "Parent Package Variable" and assign the value to the variable selected in the "Child Package Variable" before execution occurs and then will read the value of the variable selected in the "Child Package Variable" and assign the value to the variable selected in the "Parent Package Variable" after execution has occurred.

Advanced Execute Package Task- Step 5
Data Type Matching of Variables

The data type of the mapped variables must the same. For instance if you choose a string variable in the Child Package Variable, only string variables from your Package will be shown in the Parent Package Variable and available for selection.
Data Type Matching of Variables

The data type of the mapped variables must the same. For instance if you choose a string variable in the Child Package Variable, only string variables from your Package will be shown in the Parent Package Variable and available for selection.

Advanced Execute Package Task- Step 6
Variable Mappings Grid

After mappings are created, they are added to the variable mappings grid. If you need to delete a mapping, simply click the Delete button.
Variable Mappings Grid

After mappings are created, they are added to the variable mappings grid. If you need to delete a mapping, simply click the Delete button.
http://pragmaticworks.com/Products/Task-Factory/Features/AdvancedExecutePackageTask.aspx

No comments: