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

EXECUTE<br />

EXECUTE<br />

Purpose<br />

<strong>Teradata</strong> T<strong>Pump</strong> supports the <strong>Teradata</strong> SQL EXECUTE statement, which specifies a usercreated<br />

(predefined) macro for execution. The EXECUTE statement specifies the type of DML<br />

statement (INSERT, UPDATE, DELETE, or UPSERT) to be handled by the macro.<br />

The macro named in this EXECUTE statement must reside in <strong>Teradata</strong> <strong>Data</strong>base before the<br />

import task starts. Only one DML statement (INSERT, UPDATE, DELETE, or UPSERT) can<br />

be specified in a <strong>Teradata</strong> T<strong>Pump</strong> predefined macro.<br />

Caution:<br />

The SQL EXECUTE command must be used between the BEGIN LOAD command and the<br />

END LOAD command.<br />

Syntax<br />

EXECUTE name UPDATE/UPD<br />

;<br />

EXEC database.<br />

INSERT/INS<br />

DELETE/DEL<br />

UPSERT/UPS<br />

3021A001<br />

where<br />

Syntax Element<br />

database<br />

name<br />

DELETE/DEL<br />

INSERT/INS<br />

UPDATE/UPD<br />

UPSERT/UPS<br />

Description<br />

Name of the database in <strong>Teradata</strong> <strong>Data</strong>base where the macro to be executed<br />

resides<br />

Name of the macro resident in <strong>Teradata</strong> <strong>Data</strong>base to be executed<br />

Keyword indicating a DELETE statement is being executed by the macro<br />

Keyword indicating an INSERT statement is being executed by the macro<br />

Keyword indicating an UPDATE statement is being executed by the macro<br />

Keyword indicating an Atomic upsert is being executed by the macro<br />

Usage Notes<br />

Using predefined macros saves time because <strong>Teradata</strong> T<strong>Pump</strong> does not need to create and<br />

drop new macros each time a <strong>Teradata</strong> T<strong>Pump</strong> job script is run.<br />

The rules for user-created macros are:<br />

130 <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!