Using the DELETE in Import Tasks - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide - 17.20

Parallel Transporter
Release Number
June 2022
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

DELETE is a Teradata SQL statement that removes rows from a table or view that was previously identified as a target table through the use of the TD_TARGET_TABLE attribute.

The rules for using the DELETE statement in an Update import tasks are:

  • Apply the DELETE statements to either a table or a view, provided that the view does not specify a join
  • The number of input data records is unlimited
  • The equality values must be specified for all the primary index columns in the WHERE clause of a DELETE statement. Greater than and Less than operators cannot be used to specify a range of rows.
  • Do not use the OR construct in the WHERE clause of a DELETE statement. Instead, use two separate DELETE statements.

Using the DELETE Statement in an Update Import Task

  1. Add a DELETE statement to a DML group.
  2. Add the DML group to the Connection object.
  3. Initiate the Connection object.
  4. Set the DML group containing the DELETE statement using the UseDMLGroups function.
    If the DML group only contains a DELETE statement, then no data will be loaded as a result of the PutRow function call.
  5. Make at least one call to the PutRow function.
  6. Call the ApplyRows function.
  7. Terminate the Connection object.
If no row in the target table matches the DELETE statement, then the row of data sent with the DELETE statement will be put into the application error table.