Teradata Parallel Data Pump
Teradata Parallel Data Pump Reference - Teradata Developer ...
Teradata Parallel Data Pump Reference - Teradata Developer ...
- 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.
Appendix B: <strong>Teradata</strong> T<strong>Pump</strong> Examples<br />
Restarted Upsert Example<br />
= Logoff/Disconnect =<br />
= =<br />
========================================================================<br />
**** 15:22:58 UTY6216 The restart log table has been dropped.<br />
**** 15:22:59 UTY6212 A successful disconnect was made from the RDBMS.<br />
**** 15:22:59 UTY2410 Total processor time used = '0.21875 Seconds'<br />
. Start : 15:17:25 - TUE OCT 06, 2009<br />
. End : 15:22:59 - TUE OCT 06, 2009<br />
. Highest return code encountered = '0'.<br />
Restarted Upsert Example<br />
This restarted upsert example uses two IMPORT clauses. The first one loads half of the<br />
records from the data source into an empty table. The second one does an upsert using all the<br />
records in the same data file. The result is that it updates the rows inserted during the first<br />
import and inserts all of the rows that the first import skipped.<br />
This script:<br />
/***********************************************/<br />
/* Script Name: TP0734 */<br />
/* Description: WIN32 script. */<br />
/***********************************************/<br />
.LOGTABLE TPLOG0734;<br />
.LOGON ESIBMX01/LYDIADB,LYDIA;<br />
DROP TABLE TPTBL0734;<br />
DROP TABLE TPERR0734;<br />
/***********************************************/<br />
/* STEP01 CREATES THE TABLES FOR THE T<strong>Pump</strong> JOB */<br />
/***********************************************/<br />
CREATE TABLE TPTBL0734, FALLBACK(<br />
F1 INTEGER,F2 CHAR(50),<br />
F3 VARCHAR(50),F4 FLOAT,<br />
F5 BYTE (10),F6 VARBYTE (10),<br />
F7 DECIMAL(8,2),F8 BYTEINT,<br />
F9 SMALLINT,F10 DATE,<br />
F11 BIGINT,F12 DECIMAL(38,0))<br />
UNIQUE PRIMARY INDEX (F1);<br />
/***********************************************/<br />
/* BEGIN LOAD WITH ALL THE OPTIONS SPECIFIED */<br />
/* SUCH AS ERRLIMIT, CHECKPOINT, SESSIONS, */<br />
/* TENACITY, etc. */<br />
/***********************************************/<br />
.BEGIN LOADCHECKPOINT 15SESSIONS 4 1<br />
SERIALIZE ONERRORTABLE TPERR0734;<br />
.LAYOUT LAY0734;<br />
.FIELD FF1 * INTEGER KEY;<br />
.FIELD FF2 * CHAR(50);<br />
.FIELD FF3 * VARCHAR(50);<br />
.FIELD FF4 * FLOAT;<br />
.FIELD FF5 * BYTE(10);<br />
.FIELD FF6 * VARBYTE(10);<br />
.FIELD FF7 * DECIMAL(8,2);<br />
.FIELD FF8 * BYTEINT;<br />
.FIELD FF9 * SMALLINT;<br />
<strong>Teradata</strong> <strong>Parallel</strong> <strong>Data</strong> <strong>Pump</strong> Reference 239