O'Reilly logo

Knight's 24-Hour Trainer: Microsoft® SQL Server® 2008 Integration Services by Mike Davis, Devin Knight, Brian Knight

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 30. 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 the way expressions could be used to make connections dynamic. This lesson now turns to the use of expressions in tasks. Using expressions in tasks gives an SSIS developer the ability to alter individual properties within a task at runtime. A common example is using the Send Mail Task with an expression to populate the subject line to be unique based on the results of your package.

In Lesson 17 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 17.

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 30-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 a second ellipsis in the Expression property to open the Expression Builder. Here you can begin building your expression ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required