Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

$Project varialbes? Expand / Collapse
Posted Thursday, December 5, 2013 8:52 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 9:19 AM
Points: 364, Visits: 830
I'm following a course in SSIS from PluralSight. In one module, an Execute Package task references a variable in the parent task like this:


where "foo" is a Project variable (new with SQL Server 2012)

I'd like to know:

1. Is this usage documented somewhere?
2. are there other variable groups that can/must be accessed with the "$" format? e.g. can I refer to varialbes with names like @[$Package::Name] or @[$Parent::Name]?

I'm looking for some reference docs on this.
Post #1520153
Posted Thursday, December 5, 2013 2:25 PM


Group: General Forum Members
Last Login: Wednesday, May 4, 2016 11:21 AM
Points: 16, Visits: 168
There's quite a bit of documentation in books online, as well as blog posts on using the new features in 2012 SSIS.
The $ sign is a new addition for accessing project and package scoped parameters.
Variables, which existed before parameters, are accessed via @[User::<variablename>] and can have package, control flow, or even task level scoping.

Accessing a project level parameter:

Accessing a package level parameter:

Lots of beneficial uses as long as you are willing to go the route of project deployments and not atomic package deployments.
I.E. use a project level parameter for your connection strings for your project connection managers and you no longer have to worry about changing them in each package. Just add the project connection manager once to a package in a project, right click it and select parameterize and specify your project parameter and that's it. Now when you use it in other packages, it's already configured.

Also very useful for dynamically setting working directories for separating out your log files, raw files, and pending and processed files.
Post #1520331
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse