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...

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 />

into the target table. The UPDATE rows are selected based on criteria specified in a<br />

conditional clause in the statement.<br />

The DML command also allows UPDATE and INSERT statements to be paired to provide<br />

<strong>Teradata</strong> T<strong>Pump</strong> with an upsert capability. This allows <strong>Teradata</strong> T<strong>Pump</strong>, in a single pass,<br />

to attempt an UPDATE and, if it fails, perform an INSERT on the same row.<br />

The DELETE statement removes entire rows from the target table whenever the evaluation<br />

of the deleting condition is true, as specified in a conditional clause in the statement.<br />

• The only information not yet provided in the task is the identity of the input data file, the<br />

starting and ending records in the file that are being used in this task, and other related<br />

information. This is done with the IMPORT command. This command basically tells the<br />

<strong>Teradata</strong> T<strong>Pump</strong> utility to bring in file X, from record A through record N, to associate the<br />

layout name (and specifications) with the input records, and to apply the desired DML<br />

(INSERT, UPDATE, and DELETE) statement to each record.<br />

• The last command in the script is the END LOAD command. This command flags the end<br />

of the commands and statements for the task, and triggers the program to begin execution<br />

of the task.<br />

For compatibility with the MultiLoad utility, multiple IMPORTs (up to four) are allowed<br />

within a single BEGIN/END LOAD pair. However, because <strong>Teradata</strong> T<strong>Pump</strong> does have an<br />

apply phase, there is no significant difference between a script containing four BEGIN/<br />

END LOAD pairs, each with one IMPORT, and a script with one BEGIN/END LOAD pair<br />

and four IMPORTs.<br />

Procedure for Writing a Script<br />

A complete <strong>Teradata</strong> T<strong>Pump</strong> job includes:<br />

• Invoking <strong>Teradata</strong> T<strong>Pump</strong><br />

• Logging onto <strong>Teradata</strong> <strong>Data</strong>base and establishing the <strong>Teradata</strong> T<strong>Pump</strong> support<br />

environment<br />

• Specifying the <strong>Teradata</strong> T<strong>Pump</strong> tasks<br />

• Logging off from <strong>Teradata</strong> <strong>Data</strong>base and terminating <strong>Teradata</strong> T<strong>Pump</strong>.<br />

Use the following procedure as a guide for writing <strong>Teradata</strong> T<strong>Pump</strong> job scripts:<br />

Writing <strong>Teradata</strong> T<strong>Pump</strong> Job Scripts<br />

1 Invoke <strong>Teradata</strong> T<strong>Pump</strong>, specifying the runtime options:<br />

• Normal or abbreviated (brief) printout<br />

• Number of buffers per session<br />

• Character set<br />

• Configuration file<br />

• Periodicity rate<br />

• Error logging function<br />

• Macro save option<br />

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

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

Saved successfully!

Ooh no, something went wrong!