Stream Driver Macro Support - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide

Product
Parallel Transporter
Release Number
16.20
Published
November 2020
Language
English (United States)
Last Update
2020-11-19
dita:mapPath
ghk1527114222323.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2516
lifecycle
previous
Product Category
Teradata Tools and Utilities

Teradata PT supports executing macros using the Stream driver. Adhering to Teradata Parallel Data Pump protocols that are documented in the Teradata Parallel Data Pump Reference (B035-3021), note the following guidelines:

  • The macro specified in the EXECUTE statement must reside on the RDBMS prior to the start of the job. For more information on creating a macro, see SQL Data Manipulation Language (B035-1146).
  • The database user defined for the Stream driver job must have the EXECUTE privilege for the macro specified in the EXECUTE statement.
  • The EXECUTE statement used in the DML group must follow the format documented in the Teradata Parallel Data Pump Reference (B035-3021). This is the EXECUTE or EXEC command followed by the name of the macros (the database can be specified using the dot notation database.macro) followed by one of the key words, depending on what kind of statement is executed by the macro.

    The key words are:

    • INSERT
    • UPDATE
    • DELETE
    • UPSERT
  • The EXECUTE statement cannot include a parameter list. The parameter list is automatically generated by the Stream driver based on the provided schema.
  • The macro must have one or more parameters. The Stream driver does not support executing macros that do not have parameters.