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.
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 ...