Reusing Definitions with the INCLUDE Directive - Parallel Transporter

Teradata® Parallel Transporter User Guide

Product
Parallel Transporter
Release Number
17.00
Published
August 31, 2020
Language
English (United States)
Last Update
2020-08-27
dita:mapPath
zae1544831938751.ditamap
dita:ditavalPath
tvt1507315030722.ditaval
dita:id
B035-2445
lifecycle
previous
Product Category
Teradata Tools and Utilities

Teradata PT allows the inclusion of object definitions from external files into a job script, and thus the use of these definitions in more than one script. For example, you can define a schema in a text file called customer.schema:

DEFINE SCHEMA
(
      FirstName    VARCHAR(32),
      LastName     VARCHAR(32),
      ...
);

Then, to include this schema definition in the job script:

DEFINE JOB CustomerUpdate
(
      INCLUDE 'customer.schema';
      DEFINE OPERATOR...
);

You can also use job variables (@<variableName>) in files declared by the INCLUDE statement. Assignment of values to job variables takes place after the contents of the declared files have been incorporated into the job script file, from the highest priority job variable source. For more information on the various ways to set job variables and the processing priority for variable sources, see Setting Up Job Variables.