Project Variables are an attribute of the migration project. They are used to control the selection of records for migration and apply globally to the project as a whole. For example, you may want to define a project variable called 'Company Name' which is used to restrict the migration of records that relate to a particular company. The value of the project variable is defined at the time of migration.
Note that Project Variables are completely separate from Temporary Variables which are only used for field mappings and Lookup Queries.
Once defined, Project Variables can be used in Source Filtering expressions and Inclusion Filters based on Ad-Hoc Query Sets (covered in Source Filtering Articles). In this case the value within an expression may change from one execution to the next by changing the variable value. They are particularly useful when the same expression is used in multiple Source Filtering Queries within the same project.
Instead of hard-coding a value into the expression, using a Project Variable allows the user to simply define the value in one place prior to execution. That value is then substituted in all expressions where the variable is used.
For example you might have a Source Filtering Query like this:
[Submitter] = ‘Fred’
Instead you could use a project variable to achieve the same result like this:
[Submitter] = #Submitter#
where #Submitter# is the name of the variable.
Then prior to execution you can define the value that you want #Submitter# to take and this value will be substituted in all expressions where #Submitter# is used.
Using Project Variables in Assignment Field Mappings and Lookup Queries (Precision Bridge 5.0 or later)
You cannot use project variables directly in assignment field mappings or lookup queries but you can reference them indirectly. To make use of a project variable, first assign it to a temporary variable using a Simple mapping like this:

The temporary variable and project variable should have the same data-type.
Then you can use the temporary variable as before in any assignment field mapping, value mapping or lookup query as required.
Comments
0 comments
Please sign in to leave a comment.