Reusing Definitions with the INCLUDE Directive - Parallel Transporter

Teradata® Parallel Transporter User Guide - 17.20

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Parallel Transporter
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-08-25
dita:mapPath
uzp1645128359760.ditamap
dita:ditavalPath
tvt1507315030722.ditaval
dita:id
B035-2445
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.