Every Teradata PT job script has the following sections:
- An optional job header, consisting of C-style comments that can be used to record such useful information as who created the script, when it was created, and what it does and how it works.
- The declarative section of the script uses DEFINE statements to define the Teradata PT objects needed for the job. Objects identify the schemas of data sources and targets and the operators that extract, filter and load data.
- The executable section of the script specifies the processing statements that initiate the actions that read/extract, filter, insert, update, and delete data, by APPLYing tasks to the specific objects that will execute them. APPLY statements specify the operations to be performed, the operators to be used, the source and destination of data, filtering options, and the optional degree of parallelism for each operator used. APPLY statements can employ SELECT statements, WHERE clauses, and CASE DML or CASE value expressions.