16.20 - Example – Specifying Non-Operator-Attribute Job Variables - Parallel Transporter

Teradata® Parallel Transporter User Guide

Product
Parallel Transporter
Release Number
16.20
Published
August 2020
Language
English (United States)
Last Update
2020-08-27
dita:mapPath
uah1527114222342.ditamap
dita:ditavalPath
Audience_PDF_product_tpt_userguide_include.ditaval

Although the most common use of job variables is to specify the value for an operator attribute, job variables can also be used for object names and other job script parameters. In the following example, the values for @ConsumerOperator and @ProducerOperator can be assigned in the global job variables file, in a local job variables file, in a tbuild command, or in a job script using the SET directive.

 APPLY
      'INSERT INTO TABLE xyz (:col1, :col2);'
      TO OPERATOR ( @ConsumerOperator [1] )
      SELECT * FROM OPERATOR ( @ProducerOperator[2] );

Job variable can also be used in a quoted string for DML and DDL statements:

'INSERT INTO TABLE ' || @TargTable || ' (:col1, :col2, . . ., :coln);'