25.09.2015 Views

Teradata Parallel Data Pump

Teradata Parallel Data Pump Reference - Teradata Developer ...

Teradata Parallel Data Pump Reference - Teradata Developer ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 2: Using <strong>Teradata</strong> T<strong>Pump</strong><br />

Writing a <strong>Teradata</strong> T<strong>Pump</strong> Job Script<br />

Many CLI and <strong>Teradata</strong> <strong>Data</strong>base errors generate return codes of 12. For <strong>Teradata</strong> <strong>Data</strong>base<br />

errors that can be corrected and resubmitted, <strong>Teradata</strong> T<strong>Pump</strong> tries up to 16 times to resubmit<br />

and, at the end of this process, returns a code of 12. Many CLI and <strong>Teradata</strong> <strong>Data</strong>base errors<br />

generate the return code of 12, except for:<br />

• Errors on <strong>Teradata</strong> SQL statements outside of the <strong>Teradata</strong> T<strong>Pump</strong> task (before the BEGIN<br />

LOAD command or after the END LOAD command). <strong>Teradata</strong> T<strong>Pump</strong> ignores these<br />

errors, which display error messages but do not cause early termination, nor generate<br />

<strong>Teradata</strong> T<strong>Pump</strong> return codes.<br />

• Retryable errors or errors caused by <strong>Teradata</strong> <strong>Data</strong>base restarts.<br />

Writing a <strong>Teradata</strong> T<strong>Pump</strong> Job Script<br />

This section describes the contents of a <strong>Teradata</strong> T<strong>Pump</strong> job script and explains how to write<br />

one.<br />

Definition<br />

Caution:<br />

The <strong>Teradata</strong> T<strong>Pump</strong> job script, or program, is a set of <strong>Teradata</strong> T<strong>Pump</strong> commands and<br />

<strong>Teradata</strong> SQL statements that alter the contents of the specified target tables in <strong>Teradata</strong><br />

<strong>Data</strong>base. These commands and statements:<br />

• Insert new rows<br />

• Update some or all of the contents of selected existing rows<br />

• Delete selected existing rows<br />

Each <strong>Teradata</strong> T<strong>Pump</strong> job includes a number of support commands that establish and<br />

maintain the <strong>Teradata</strong> T<strong>Pump</strong> support environment, and a number of task commands that<br />

perform the actual database insert, update, or delete operations. These commands and<br />

statements identify and describe the input data to be applied to the target table, and then place<br />

that data into the target table. These activities may commence anytime after configuring the<br />

program as described in “<strong>Teradata</strong> T<strong>Pump</strong> Support Environment” on page 37.<br />

In the event of a client failure, the identical script must be resubmitted in order to restart. If<br />

the script is edited, a restart will not be permitted.<br />

Script Writing Guidelines<br />

The following script writing guidelines will help write a <strong>Teradata</strong> T<strong>Pump</strong> job script:<br />

• A script may contain up to four IMPORTs (tasks), delimited by a leading BEGIN LOAD<br />

command and a trailing END LOAD command.<br />

• The BEGIN LOAD command specifies the number of sessions and establishes a number of<br />

controlling parameters.<br />

The BEGIN LOAD command also specifies the error table, and is the only table specified.<br />

An optional qualifying database name may also be specified. This database name may be<br />

<strong>Teradata</strong> <strong>Parallel</strong> <strong>Data</strong> <strong>Pump</strong> Reference 69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!