Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

SQL Server, T-SQL, BI and more...
Browse by Tags · View All
ssis 26
SSIS 26
SQLServerPedia Syndication 19
Business Intelligence 14
T-SQL 13
ssrs 10
SSRS 10
General 9
SSAS 8
sqlpass 4

Archive · View All
January 2012 14
April 2012 5
March 2012 5
February 2012 5
November 2012 3
October 2012 3
June 2012 3
May 2012 3
August 2012 2
July 2012 2

Sam Vanga's Blog

How to execute a package from another package?

May 1 2012 12:00AM by Samuel Vanga   

I hear you. You’ll use the Execute Package Task. This mechanism of executing one package from another is popularly knows as Parent Child paradigm. Let me tell you, this isn’t new in 2012. There are, however, a few changes to the Execute Package Task. Let’s take a look.

Demoland!

I added two packages to the project and conveniently named them Parent.dtsx and Child.dtsx.

Parent Child Packages SSIS 2012

Child Package

In the child package, I added a script task and used the following script. This will display a message box and tells that it is executing.

MsgBox(“Howdy! I’m the child package”)

image

Parent Package

In the parent package, I added an Execute Package Task and renamed it to Run Child Package.

image

In the Package page of the Execute Package Task editor, there is a new property called reference type. It is set to Project Reference by default. This means you can point the execute package task to another package within the same project. I selected Child.dtsx from the drop down.

image

The following is the output when I execute the parent package.

image

In prior versions, you’ll have to choose either file system or SQL Server as the source for child package and have connection managers to all the child packages in the parent. For example, if you have one parent package calling 50 child packages, the parent needs 50 connection managers to each of those child packages. This is still supported for legacy packages – change the reference type property to External Reference.

Passing a variable from parent to child

You often pass variables from parent package to the child package; connection strings, parent package start time, parent package name (ok. May be). Again, in the previous versions, you would use a parent package configurations to do this.

In this example, I’ll pass parent package name to the child package.

Another change to the Execute Package Task is parameter binding. You can map a parameter or a variable from the parent package to a parameter in the child package.

In the below image, I created a parameter in the child package. I wrote about SSIS parameters in an earlier post.

image

From the parent package, open the Execute Package Task Editor. In the parameter bindings page, I mapped the child parameter to the parent’s PackageName system variable.

image

Then I changed the script in the child package as follows:

MsgBox(“Howdy! I’m the Child Package. I was called by ” & Dts.Variables(“$Package::ParentName”).Value.ToString)

When I execute the parent package, I see…

image

Zip It

In this post, I looked at using Execute Package Task to call a package from another and pass variable from parent to child.

@SamuelVanga



Republished from Sam Vanga's Blog [16 clicks].  Read the original version here [1 clicks].

Samuel Vanga
549 · 0% · 68
3 Readers Liked this
Jacob Sebastian Liked this on 5/2/2012 4:16:00 AM
Profile · Blog · Facebook · Twitter
Khyati Patel Liked this on 5/3/2012 2:25:00 AM
Profile · Facebook · Twitter
Guru Samy Liked this on 5/7/2012 7:24:00 AM
Profile · Blog
3
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

2  Comments  

  • Nice article, but the title was misleading.

    commented on May 2 2012 1:35PM
    Sudeep Raj
    12 · 13% · 4306
  • Sudeep - Thanks for reading and the feedback. I partially agree. I'm still learning you know - what do you think should have been an apt title? Will be great to hear your thought!

    commented on May 2 2012 2:10PM
    Samuel Vanga
    549 · 0% · 68

Your Comment


Sign Up or Login to post a comment.

"How to execute a package from another package?" rated 5 out of 5 by 3 readers
How to execute a package from another package? , 5.0 out of 5 based on 3 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]