15.10 - Reusing Definitions with the INCLUDE Directive - Parallel Transporter

Teradata Parallel Transporter User Guide

prodname
Parallel Transporter
vrm_release
15.10
category
User Guide
featnum
B035-2445-035K

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” on page 47.