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

DML<br />

Syntax Element<br />

label<br />

MARK<br />

Description<br />

Unique label is to be used for the immediately following set of one or more<br />

DML statements<br />

A label must obey the same rules for its construction as <strong>Teradata</strong> SQL column<br />

names.<br />

The label name may be referenced in the APPLY clause of an IMPORT<br />

command.<br />

Keyword indicating that the system should make a duplicate, missing, or extra<br />

INSERT, UPDATE, or DELETE row entry in the error table and continue<br />

processing.<br />

A row is a duplicate row if all column values in the row are the exact duplicate<br />

of another row. Duplicate row checking is bypassed if the table is a multiset<br />

table (which allows duplicate rows), or if the table has one or more unique<br />

indexes (the uniqueness test(s) make any duplicate row check unnecessary).<br />

If MARK is set and a uniqueness violation occurs on either a unique primary<br />

index or a unique secondary index, the offending rows go to the error table,<br />

whether or not the row is a duplicate row. In the case of an upsert, both the<br />

INSERT and UPDATE portions must fail for an error to be recorded.<br />

If neither MARK or IGNORE is specified for duplicate rows, MARK applies to<br />

both INSERTs and UPDATEs. Similarly, if neither MARK or IGNORE is<br />

specified for missing or extra rows, MARK applies to both UPDATEs and<br />

DELETEs.<br />

MARK is the default for:<br />

• Both UPDATEs and DELETEs that refer to missing or extra rows.<br />

• Duplicate rows arising from both INSERTs and UPDATEs, except when<br />

those statements are combined to form an upsert, in which case the default<br />

is IGNORE.<br />

IGNORE<br />

keyword indicating that the system should not make an error table entry for<br />

the duplicate, missing, or extra INSERT, UPDATE, or DELETE row<br />

The system should continue processing instead.<br />

A row is a duplicate row if all column values in the row are the exact duplicate<br />

of another row. Duplicate row checking is bypassed if the table is a multiset<br />

table (which allows duplicate rows), or if the table has one or more unique<br />

indexes (the uniqueness test(s) make any duplicate row check unnecessary); in<br />

these cases, IGNORE DUPLICATE ROWS has no effect. Any uniqueness<br />

violations will result in the offending rows going to the error table.<br />

If neither INSERT nor UPDATE is specified for duplicate rows, IGNORE<br />

applies to both INSERTs and UPDATEs.<br />

Similarly, if neither UPDATE nor DELETE is specified for missing or extra<br />

rows, IGNORE applies to both UPDATEs and DELETEs. IGNORE is the<br />

default condition for an upsert operation.<br />

INSERT<br />

The upsert feature may be used (when used as DO INSERT FOR MISSING<br />

UPDATE ROWS or DO INSERT ROWS).<br />

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