Lesson One, where I introduce tons of prerequisite new concepts in preparation for Deploying and Executing in Lesson Two. The main concepts and terms covered in this lesson are:
- Project Deployment Model
- Legacy Deployment Model
- Project Reference reference type –Execute Package Task
- Ispac files
- Parameters, subdivided into the two following subtypes:
- Project Parameters
- Package Parameters
It will help if you are familiar with the following concepts inside SSIS (pre 2012 versions) before attempting this course 😉
- Execute SQL Task
- Execute Package Task
- Connection Managers
- Parent/Child packages
SSIS in 2012 brings a great number of significant changes. It is the first version since its initial release with SQL Server 2005 to look significantly different. There is a more modern look and feel to be sure. However, the really big change to SSIS in 2012 is in the way in which it is deployed. There is a new method of deployment called “Project Deployment”, which has as much to do with how and where a package is deployed as it does with how a package is bundled during development. Let me go back in time a bit and explain.
Too far back. –Don’t ever do that again.
Ok. Recall that for pre- 2012 versions of SSIS, no matter how nicely grouped in solutions or projects your packages are, when it came time to deploy a package, that package was atomic. Its connection managers went with it and it had no dependencies on other elements inside the project (other than parent package variables)? Well prepare yourself for a paradigm shift–that all changes with the Project Deployment model. The Project is now the main unit in SSIS development. SSIS Projects now get built. When they are built they create a new file type called an ispac file and this is what is now deployed.
Ice Pack? No, ispac
(just a note/disclaimer here to the gnarled, grizzly “old school” SSIS Developers who have templates, frameworks, and methodologies all built around the “old” way of doing things– you can still develop in SSIS the old fashioned way! Just convert your projects to the Legacy Deployment model by right clicking on the project in Solution Explorer and selecting “convert to legacy deployment model). In fact in large team environments with staggered development and staggered deployment, I think the legacy model is still the way to go.
Stay Calm! You can still design in Legacy Deployment Mode! All is Well!
The shift to projects introduces some new objects and some changes to familiar objects. Connection Managers can now be created as Shared Connection Managers at the Project level. However, the truly paradigm shifting new object s are Parameters.
Fun Facts about Parameters
- They behave like variables, differing in scope and exposure to change.
- They are located in tabs in the SSIS designer.
- They are the Project Deployment replacement for Configurations in Legacy Deployment Mode.
- They come in two flavors– Project parameters are viewed by right clicking on the project and select Project Parameters and Package parameters are made visible from the SSIS menu.
- Their values cannot change during the execution of a package.
- Their values can be changed IN BETWEEN Package executions, as in –when a Parent Package calls a Child Package.
- Their Values can be set from the SSIS Catalog, inside Executions–(more on both of those terms in Lesson 2.)
- Inside Expression Builder, they are preceded with a dollar sign $ and then Project or Package, as the case may be.
Project Parameters, Shared Connection Managers
A look inside Expression Builder with Parameters added to the mix.
I know what you’re probably thinking– Why aren’t you working on your Reporting Services Chapter Julie? — No? Just me wondering that? — Ok, what you are probably really asking is: what is the difference between a package parameter and a project parameter? The difference is in scope of course, and it is great to have Project Parameters which can be consumed by all the packages inside a project, but that still didn’t give me a grasp on why Microsoft bothered with Package Parameters. Why not just use a variable, since it too can be scoped to the Package. Then I started playing with the new Execute Package task, and the reason for Package Parameters became clear.
The new Execute Package task, its role in the Project Deployment Model, and how it consumes Package Parameters
Now that the basic unit of SSIS is the Project, there are a few onerous tasks we as ETL developers will no longer have to perform. For instance, it used to be that the only way to configure an Execute Package task with the location of a child package was by supplying it through a connection manager. Not so anymore. Now by virtue of the fact that a package resides within the same project, an Execute Package task will be able to execute it without supplying a connection manager. The Execute Package task will use the Project Reference reference type and just know about all the packages which the parent could call. No connection manager required!
Look Ma! No Connection Managers.
Execute Package tasks in the new model are used to assign values to Package Parameters, usually directly from the value of a Variable (but it can be from a variable or a parameter). The familiar design pattern I used to learn how this works and why there are Package Parameters was this:
Let’s say I use an auditing framework and record the execution of every parent package, along with all of the child packages that parent package calls. I would have a table which would give me a key value column for an ExecutionID and each row would have a column for that id and a ParentExecutionID. Parent Packages would have NULL as the value for ParentExecutionID.
As a row gets added for each new parent package being executed, I would use an Execute SQL task to stuff the value of the Parent’s ExecutionID into a variable. Then when the Parent Package got to an Execute Package Task, I would take the value of that variable and pass it to a Package Parameter inside the Child Package. This is done on the Parameter Bindings tab of the Execute Package task. That way when the child package wrote its auditing details, it would not only have its ExecutionID, but the value of its Parent Package’s ExecutionID as well. Only Package Parameters are able to receive a value during an Execute Package task, and that would be the Major Difference between Project and Package Parameters.
This shot shows the Parameter bindings page of an Execute Package task. The value of the Child.dtsx package’s Package Parameter named ParentExecutionID is being supplied by the value of the Parent.dtsx package’s variable named ExecutionID.
(The typical way to do this with Pre-2012 versions of SSIS was to use Parent Package Variables inside Configurations.)
Ok kids. Great work today. See you Thursday when we’ll take all that we learned and use it to execute packages! Be sure to check out other lessons at SQL University—