Parameter Strings

See Creating Parameters in Visual Integrator and Inserting Visual Integrator Parameters for options using the GUI.

Integrator supports the use of parameters in a script. A parameter is a string of characters enclosed in backticks (`) that is replaced at run time by a value specified on the command line or by a value that was defined using the Parameter object. The backtick character (`) is typically positioned on a QWERTY keyboard on the same key as the tilde (~) character and located to the left of the numeral one (1) key. The backtick character is not the same character as a single quote character (which is located on the same key as the double quote character next to the Enter key).

Parameter strings can be used as attribute values or array values. For a parameter to be evaluated, the parameter name must be preceded by a dollar sign and the parameter name should be enclosed in parentheses. For example:

$(parm_name)

Although the parameter name is not always required to be enclosed within parentheses, it is recommended that they are always enclosed since there are situations in which they are required. Once a parameter has been defined various input, process, and output objects in a script can use the parameter by including the parameter name in the parameter string. In the following example, a parameter named year is being referenced by a Filein object's filename attribute:

filename = ‘sales_$(year).txt‘

If a parameter name contains non-alphanumeric characters other than underscores, or the parameter name is followed by other alphanumeric characters in the parameter string, the parameter name must be enclosed in parentheses following the dollar sign. In the first two examples below, the parameter name can either be enclosed or not enclosed within parentheses. In the third example, the parameter name must be enclosed since it is followed by a "\".

Examples

bf=‘$blocksize‘
bf=‘$(blocksize)‘
input=‘$(datadir)\\sales.txt‘
comment = ‘Running Quarter Summaries - month is $(RunMth)‘

When defining parameter strings consider the following:

  • Dollar signs can be defined in the parameter string by using two dollar signs ($$).
  • The parameter string character limit is 255.
  • In situations where parameter names are the same as column names, use a single dollar sign to refer to the parameter value and use two dollar signs to refer to the column value. For example:
    • ‘$(field)‘ pulls data from the parameter named "field" defined in the Parameter object

    • ‘$$(field)‘ pulls data from the column called "field" in the data flow

  • Any time you enclose a column name in a parameter string, the column name must be prefaced with $$.