17.00 - Using the Delete Task - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide

prodname
Parallel Transporter
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-2516-220K

Use the Update driver’s Delete Task with or without variable substitution. If variable substitution is used, the Update driver requires a schema. The following sections give an overview of the steps needed to use the Update Delete Task.

Using DELETE in Delete Tasks

Deleting rows in a Delete Task is faster than deleting rows in an import task. The rules for using the DELETE statement in Delete tasks are:

  • Only one special session can be connected
  • Only one instance may be specified
  • Only one DML group may be specified
  • Only one DML statement in the DML group may be specified
  • Only one target table may be specified
  • The first error table is not used and is ignored
  • Only one data record is provided if using variable substitution in the WHERE clause.
  • There can be no calls to the EndAcquisition function.

Using the Update Delete Task Without Variable Substitution

  1. Set the TD_DELETE_TASK attribute to “Yes”.
  2. Add one DELETE statement to a DML group.
  3. Add the DML group to the Connection object.
  4. Initiate the Connection object.
  5. Call the ApplyRows function.
  6. Terminate the Connection object.
Do not add a schema to the Connection object.

Using the Update Delete Task with Variable Substitution

  1. Set the TD_DELETE_TASK attribute to “Yes”.
  2. Add the schema corresponding to the variable substitution to the Connection object.
  3. Add one DELETE statement to a DML group.
  4. Add the DML group to the Connection object.
  5. Initiate the Connection object.
  6. Use PutRow to pass in variable substitution data (one call only).
  7. Call the ApplyRows function.
  8. Terminate the Connection object.