Reusing Definitions with the INCLUDE Directive - Parallel Transporter

Teradata Parallel Transporter User Guide

Product
Parallel Transporter
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2445
lifecycle
previous
Product Category
Teradata Tools and Utilities

Reusing Definitions with the INCLUDE Directive

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.