Teradata Parallel Data Pump
Teradata Parallel Data Pump Reference - Teradata Developer ...
Teradata Parallel Data Pump Reference - Teradata Developer ...
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Chapter 2: Using <strong>Teradata</strong> T<strong>Pump</strong><br />
Writing a <strong>Teradata</strong> T<strong>Pump</strong> Job Script<br />
different from the database being modified, thus allowing tables to be created and dropped<br />
with no impact on the production database.<br />
In addition, the BEGIN LOAD command establishes acceptable threshold levels for<br />
important task controls, such as number and percentage of errors, session limits, duration<br />
of logon attempts in hours (tenacity), and checkpointing frequency. This command also<br />
provides optional controls to:<br />
• determine where any macros are placed<br />
• guarantee serial operations on given rows<br />
• select the number of statements to pack into a multiple-statement request<br />
• select a restart logic mode<br />
• The next item appearing in a script is usually a description of the records in the external<br />
file containing the change data for the target tables. The description of these input records<br />
appears in a sequence of commands headed by the LAYOUT command.<br />
The LAYOUT command tags the record layout being depicted with a unique name, which<br />
is then referenced by subsequent script commands in tasks throughout the rest of the job.<br />
The LAYOUT is followed by the supporting information contained in the sequence of one<br />
or more FIELD, FILLER, and TABLE commands.<br />
• Each FIELD command describes a single data item occupying a column in the input row.<br />
These items are described by data type, starting position, length, and several other<br />
characteristics. The FIELD command is used only for those items (columns) relevant to<br />
the current task, which are to be sent to <strong>Teradata</strong> <strong>Data</strong>base as changes to the target table.<br />
The FIELD command may include the KEY modifier if the column is to be considered part<br />
of the primary index for purposes of serialization.<br />
• Each FILLER command describes a column in the input row in the same way as the FIELD<br />
command. These FILLER fields are never sent to <strong>Teradata</strong> <strong>Data</strong>base. The FILLER<br />
command, however, identifies those columns which should not be sent to <strong>Teradata</strong><br />
<strong>Data</strong>base. Thus, if a sequence of 10 alternating FIELD and FILLER commands is used to<br />
describe 10 contiguous columns in the row, every other column, a total of five columns,<br />
would be sent to <strong>Teradata</strong> <strong>Data</strong>base.<br />
• The TABLE command identifies any existing table with the same layout as the input. The<br />
TABLE command is used when the changes are being enacted on entire rows, rather than<br />
selected columns.<br />
• The next entry in the script is the DML command, which is followed by the DML<br />
statements INSERT, UPDATE, and DELETE. The DML command creates an identifying<br />
label for the DML statement input, which immediately follows the command. The DML<br />
command also defines an error handling process for handling missing and duplicate rows,<br />
with respect to the error table.<br />
The three DML statements (INSERT, UPDATE, and DELETE) follow the DML command,<br />
and may occur in any order and in any quantity. The INSERT statement is used to place a<br />
complete and entirely new row into the target table.<br />
The UPDATE statement takes the data contents from columns in the input record, as<br />
defined with the LAYOUT, FIELD, FILLER command sequence, and substitutes the data<br />
70 <strong>Teradata</strong> <strong>Parallel</strong> <strong>Data</strong> <strong>Pump</strong> Reference