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 3: <strong>Teradata</strong> T<strong>Pump</strong> Commands<br />

IMPORT<br />

APPLY Example<br />

• NOSTOP<br />

If NOSTOP is specified, <strong>Teradata</strong> T<strong>Pump</strong> will not terminate even if an error is encountered.<br />

By specifying both options and redirecting STDERR to a file location instead of the terminal<br />

screen, the <strong>Teradata</strong> T<strong>Pump</strong> job runs to completion and saves all the error records. Then the<br />

error records can be manually modified and loaded into the table.<br />

All IMPORT commands for a <strong>Teradata</strong> T<strong>Pump</strong> task must appear between the BEGIN LOAD<br />

and END LOAD commands for the task.<br />

<strong>Teradata</strong> T<strong>Pump</strong> imposes several syntax rules for the parms string for an INMOD user exit<br />

routine. On entry to any INMOD user exit routine for <strong>Teradata</strong> T<strong>Pump</strong>, the conventional<br />

parameter register points to a parameter list of two 32-bit addresses used to communicate<br />

with the INMOD.<br />

At the end of an IMPORT, an environmental variable is established for each DML command<br />

executed. <strong>Teradata</strong> T<strong>Pump</strong> variables are not constrained to 30 characters. These variables<br />

contain the activity counts associated with each statement. The variables created are of the<br />

form:<br />

&IMP __<br />

where<br />

n = the number of the IMPORT, from one through four.<br />

Apply label = the label of the clause containing the DML command in question.<br />

x = the number of the statement within the containing APPLY clause.<br />

The following script is an example of a <strong>Teradata</strong> T<strong>Pump</strong> job using the APPLY keyword to<br />

create conditional clauses to apply DML INSERTs, UPDATEs, and UPSERTs to the IMPORT.<br />

.BEGIN LOAD SESSIONS 34;<br />

.LAYOUT EQTTB535;<br />

.FIELD Pool_Upd_Code * CHAR(01);<br />

.FIELD Eqmt_Init<br />

* CHAR(04);<br />

....<br />

.DML LABEL UPSERTAC<br />

DO INSERT FOR MISSING UPDATE ROWS;<br />

UPDATE EQTDBT50.EQTTB535_TAL SET<br />

TCS_POOL_IDFR_NUM =:TCS_POOL_IDFR_NUM<br />

.....<br />

WHERE<br />

.....<br />

;<br />

INSERT INTO EQTDBT50.EQTTB535_TAL<br />

VALUES(<br />

POOL_EXPN_DATE =:POOL_EXPN_DATE (DATE, FORMAT 'YYYYMMDD')<br />

.....<br />

);<br />

.DML LABEL UPSERTDL;<br />

UPDATE EQTDBT50.EQTTB535_TAL SET<br />

.....<br />

WHERE<br />

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

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

Saved successfully!

Ooh no, something went wrong!