Specifying DDL Statements in the Teradata PT APPLY Statement - Parallel Transporter

Teradata Parallel Transporter Reference

Product
Parallel Transporter
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2436
lifecycle
previous
Product Category
Teradata Tools and Utilities

Specifying DDL Statements in the Teradata PT APPLY Statement

The SQL statements that the DDL operator supports are specified in the Teradata PT APPLY statement.

The following examples show how to specify DDL statements in the APPLY statement:

  • One SQL statement per group
  •    APPLY
          'ddl stmt1',
          'ddl stmt2',
          .........
          'ddl stmt3'
       TO OPERATOR (operator specification)
  • Multiple SQL statements in a group, but only one group
  •    APPLY
          ('ddl stmt1','ddl stmt2', ... ,'ddl stmtn')
       TO OPERATOR (operator specification)
  • Multiple SQL statements per group, and multiple groups
  •    APPLY
          ('ddl stmt11','ddl stmt12', ... ,'ddl stmt1n'),
          .
          .
          .
         ('ddl stmtx1','ddl stmtx2', ... ,'ddl stmtxm')
       TO OPERATOR (operator specification)

    If more than one statement is specified in one group, then the DDL operator combines all statements into one single multistatement request and sends it to the Teradata Database as one implicit transaction. This means that any statement failure or any error rolls back the entire transaction.

    The SQL statements are executed by groups in the order they are specified in the APPLY statement.Currently, the maximum number of SQL statement groups that can be specified in the APPLY statement is 1024. If the number of SQL statement groups is greater than 1024, Teradata PT terminates the job with the TPT05537 error message.