If you extract metadata from packages that use variables, you can create a variable values file to define the variables. Create a variable values file when the packages do not contain values for all variables or when you want to override the values defined in the packages.
You specify the variable values file when you create the SQL Server Integration Services resource. Metadata Manager uses the variable values file to resolve the variables. Metadata Manager can resolve variables that specify the table or view name in an OLE DB source or destination. Metadata Manager can also resolve variables that specify an SQL query in an OLE DB source. You cannot define SQL Server Integration Services parameters in a variable values file.
To define variables in the variable values file, group the variables by scope, either package-level or task-level. Define each variable on a separate line. You must also enter the namespace as a prefix.
Use the following syntax to define a variable that has a package-level scope:
[Package]
Namespace::Variable=Value
Use the following syntax to define a variable that has a task-level scope:
[Package.Task]
Namespace::Variable=Value
Variable names are case sensitive.
If you define the same variable multiple times, Metadata Manager resolves the variables as follows:
If you define the variable in a package and in a task within the package, Metadata Manager uses the value that you define for the task.
If you define the variable multiple times within a package or task, Metadata Manager uses the last value that you define.
If you define a variable in the variable values file and the variable has a default value in the package, Metadata Manager uses the value in the variable values file.
The following example shows a variable values file that defines variables for two tasks within a package:
[SSIS_Package_Configuration.Data Flow Task]
User::TargetTableName=PERSON_OUT
User::TableName=Person
[SSIS_Package_Configuration.SQL_From_Variable]
User::MySQL_Target=PERSON_OUT
User::MySQL=SELECT Name as FirstName, Name as LastName, Name as MiddleName FROM Purchasing.Vendor