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.
Chapter 3: <strong>Teradata</strong> T<strong>Pump</strong> Commands<br />
UPDATE Statement and Atomic Upsert<br />
Usage Notes - Update<br />
Temporal Semantics<br />
The following notes describe how to use an UPDATE statement following a DML command.<br />
An UPDATE statement may also be used in the support environment; normal rules for<br />
UPDATE are followed in that case.<br />
• To update records in a table, the userid that is logged on must have UPDATE privilege for<br />
the table.<br />
• In an IMPORT task, if multiple Unique Primary Index (UPI) columns are specified, the<br />
columns should all be specified in the WHERE clause of the UPDATE statement. In this<br />
case, the WHERE clause is fully qualified, thereby allowing <strong>Teradata</strong> T<strong>Pump</strong> to avoid table<br />
locks and optimize the processing.<br />
• For <strong>Teradata</strong> T<strong>Pump</strong> use, if the object of the UPDATE statement is a view, it must not<br />
specify a join. <strong>Teradata</strong> T<strong>Pump</strong> operates only on single table statements so UPDATE<br />
statements must not contain any joins.<br />
• Only one object may be identified.<br />
• The OR construct can be used in the WHERE clause of a DELETE statement; alternatively,<br />
two or more separate DML statements (one per OR term) can be used, with the DML<br />
statements applied conditionally with the APPLY clause of the IMPORT command. The<br />
nature of the alternatives will usually make one of the methods more appropriate.<br />
• The maximum number of INSERT, UPDATE, and DELETE statements that can be<br />
referenced in an IMPORT is 128. The 128th DML which would cause the insertion of the<br />
DML sequence number of 128 for the DMLSEQ field in the error table could lead to<br />
<strong>Teradata</strong> <strong>Data</strong>base 3520 error.<br />
• The maximum number of DML statements that can be packed into a request is 2430 . The<br />
default number of statements packed is 20.<br />
• To ensure data integrity, the SERIALIZE parameter defaults to ON in the absence of an<br />
explicit value if there are upserts in the <strong>Teradata</strong> T<strong>Pump</strong> job.<br />
DML validtime qualifier and NONTEMPORAL semantics are supported. For more<br />
information, see SQL <strong>Data</strong> Manipulation Language and SQL <strong>Data</strong> Manipulation Language<br />
Advanced Topics.<br />
Example<br />
The following example describes an input data source containing a series of 14-byte records.<br />
Each record contains the value of the primary index column (EmpNo) of a row of the<br />
Employee table whose PhoneNo column is to be assigned a new phone number from field<br />
Fone.<br />
.BEGIN LOAD SESSION number;<br />
.LAYOUT Layoutname;<br />
.FIELD EmpNum 1 INTEGER;<br />
.FIELD Fone * (CHAR (10));<br />
.DML LABEL DMLlabelname;<br />
UPDATE Employee SET PhoneNo = :Fone WHERE EmpNo = :EmpNum;<br />
<strong>Teradata</strong> <strong>Parallel</strong> <strong>Data</strong> <strong>Pump</strong> Reference 189