0 / 0
Stage variables in DataStage

Stage variables

You can declare and use your own variables within a Transformer stage. Such variables are accessible only from the Transformer stage in which they are declared.

Stage variables can be used as follows:

  • They can be assigned values by expressions.
  • They can be used in expressions which define an output column derivation.
  • Expressions evaluating a variable can include other variables or the variable being evaluated itself.
  1. On the Stage tab, select Stage variables, and then click Add stage variable +.
  2. Enter the variable name, initial derivation value, SQL type, extended information (if variable contains Unicode data), precision, scale, and an optional description. Variable names must begin with an alphabetic character (a-z, A-Z) and can only contain alphanumeric characters (a-z, A-Z, 0-9).
  3. Click OK. The new variable appears in the stage variable table in the links pane.
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more