Problem: How to Execute or
call a package from another package in SSIS?
Inside the control flow we can create a task for calling a
package to execute or reference child packages inside a parent package to run a
pre-requisite package for the load before it runs.
The Execute Package task extends the enterprise
capabilities of Integration Services by letting packages run other packages as
part of a workflow.
You can use the Execute Package task for the following purposes:
·
For loading data into a star schema, you can build a
separate package to populate each dimension and the fact table.
·
build a data extraction module that can be called
from different packages. Each package that calls the extraction module can
perform different data scrubbing, filtering, or aggregation operations.
·
The parent package runs the accessory packages, and
based on the success or failure of the accessory packages, the parent package
either commits or rolls back the transaction.
·
Controlling package security. Package authors require
access to only a part of a multipackage solution. By separating a package into
multiple packages, you can provide a greater level of security, because you can
grant an author access to only the relevant packages.
A
package that runs other packages is generally referred to as the parent
package, and the packages that a parent workflow runs are called child
packages.
Example:
In the example, I would like to show we can reference a
child package which is executed from a parent package.
Step 0: Create a new package called parent package.
Step 1: Drag and drop the execute package and edit the
package properties to reference the package from the properties like below and
from the drop down select the child package you want to reference.
Step 2: Execute the package from the parent package and this
will open the child package and execute it from the parent package.
Output:
As you can see this will open and execute the child package.
0 comments:
Post a Comment