-
Book Overview & Buying
-
Table Of Contents
Microsoft SQL Server 2012 Integration Services: An Expert Cookbook
The Expression Task is one of the SSIS Control Flow Tasks. The reason why we excluded it from Chapter 2, Control Flow Tasks, is that this task works only with expressions and variables and is much more relevant to this chapter.
The Expression Task provides a way of setting a variable's value with an expression. This is a handy task and was added recently in SSIS 2012. Besides the fact that this task didn't exist in the previous versions of SSIS, there was an alternative solution for same cases, which is used frequently.
In this recipe, we will create a filename based on the date of running the package and combine it with a folder path to create a full file path.
Create an SSIS project and name it R04_Expression Task.
Add two variables to the package scope as shown in the following screenshot:

Drag-and-drop an Expression Task into Control Flow and double-click on it.
Add the following expression in the Expression Builder window of the Expression Task Editor, as...
Change the font size
Change margin width
Change background colour