In each succeeding version of DTS, variables have taken on a more important and central role in packages. This is certainly true of Integration Services (IS). In IS, variables have become absolutely essential. Variables are the primary method of communication between all components and make it possible to create packages that are more dynamic and configurable. This chapter discusses important concepts about variables and how to use them. A common guideline in any traditional coding or development environment, "Hard-coding strings is bad," holds true for IS as well. Specifying the location of a file or the name of a table by directly typing it into a property should be avoided because it's difficult to manage and update packages written that way. Variables should be used extensively within the package for all settings. Following are some examples of how components use variables:
Because variables have an expanded role and set of features, have grown in importance, and come in different flavors, this chapter is dedicated to thoroughly describing them. So, what is an Integration Services variable? Simply put, IS variables are objects that store values and that other objects such as tasks and transforms use to store data temporarily. Note Variables were known as "Global Variables" in DTS. The reason Microsoft dropped the "Global" moniker is because variables in IS have scope and are not always visible to the entire package. Although you can still create variables at the package level (global) in IS, variables can now be created at different scopes throughout the package on containers. |