Chapter 35

Making a Task Dynamic with Expressions

When you consider the many places expressions can be applied, you begin to see how highly adaptable SQL Server Integration Services (SSIS) truly is. The previous lesson discussed how you can use expressions to make connections dynamic. This lesson turns to the use of expressions in tasks. Using expressions in tasks enables an SSIS developer to alter individual properties within a task at run time. A common example is using the Send Mail Task with an expression to populate the subject line based on the results of your package.

NOTE In Lesson 21, you learned about the Derived Column Transform and many of the common functions used in expressions. This lesson focuses on using expressions in tasks, so if you want a recap on the expression language itself, refer to Lesson 21.

You set up a task to use expressions exactly the same way you configure connections to use expressions. To configure a task to take advantage of expressions, select the desired task and press F4 to open the Properties window. Find the Expression property and click the ellipsis () next to it, shown in Figure 35-1. This action opens the Property Expressions Editor where you can select to which property inside the task you would like to add an expression. Once you have selected the property from the drop-down box, click the ellipsis in the Expression property to open the Expression Builder. Here you can begin building your expression for the given property you ...

Get Knight's Microsoft SQL Server 2012 Integration Services 24-Hour Trainer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.