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

Restart and Recovery<br />

• DDD is the number of the .DML sequence (ordinal) number. This value is not reset to one<br />

for successive loads (.BEGIN LOAD) in a single job, but continues to be incremented.<br />

• SSS is the SQL statements sequence (ordinal) number within the .DML group.<br />

Thus, given the following script fragment:<br />

.LOGTABLE LT_SIGH;<br />

.LOGON TDPID/CME,CME;<br />

...<br />

.LAYOUT LAY1A<br />

...<br />

.DML LABEL TAB1PART1;<br />

INSERT into tab1 values (:F0,:F1,:F2,:F3);<br />

.DML LABEL TAB2PART1;<br />

INSERT into tab2 values (:F0,:F1,:F2,:F3);<br />

...<br />

.IMPORT INFILE TPDAT<br />

LAYOUT LAY1A<br />

APPLY TAB1PART1<br />

APPLY TAB2PART1;<br />

and assuming the job name is defaulted, the macros are named:<br />

M20020530_171209_06222_001_001 and M20020530_171209_06222_002_001.<br />

The contents of a <strong>Teradata</strong> T<strong>Pump</strong> macro is taken directly from the script and consists of a<br />

parameter clause derived from the LAYOUT and the actual statement which is specified in the<br />

script. Continuing the example above, if the LAYOUT associated with the statement is as<br />

follows:<br />

.LAYOUT LAY1A;<br />

.FIELD F0 * integer key;<br />

.FIELD F1 * integer;<br />

.FIELD F2 * integer;<br />

.FILLER FX * integer;<br />

.FIELD F3 * char(38);<br />

then the macros will be created as follows:<br />

CREATE MACRO CME.M20020530_171209_06222_001_001 (<br />

F0 (INTEGER), F1 (INTEGER), F2 (INTEGER), F3 (CHAR(38))<br />

) AS (INSERT INTO TAB1 VALUES(:F0, :F1, :F2, :F3);<br />

);<br />

CREATE MACRO CME.M20020530_171209_06222_002_001 (<br />

F0 (INTEGER), F1 (INTEGER), F2 (INTEGER), F3 (CHAR(38))<br />

) AS ( INSERT INTO TAB2 VALUES(:F0, :F1, :F2, :F3);<br />

);<br />

Note that the actual names of the parameters in the parameter list are not important; however,<br />

what is important is that the types of the parameters are specified in the macro in exactly the<br />

same order as the types in the LAYOUT. Also important is the fact that FILLER fields are not<br />

included in the parameter list since they are stripped out by <strong>Teradata</strong> T<strong>Pump</strong>.<br />

The error table, if it is not explicitly specified, is:<br />

_nnn_ET<br />

Where nnn is the load sequence number.<br />

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

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

Saved successfully!

Ooh no, something went wrong!