16.20 - Sending Data to Multiple Targets - Parallel Transporter

Teradata® Parallel Transporter User Guide

Product
Parallel Transporter
Release Number
16.20
Published
August 2020
Language
English (United States)
Last Update
2020-08-27
dita:mapPath
uah1527114222342.ditamap
dita:ditavalPath
Audience_PDF_product_tpt_userguide_include.ditaval

Use this procedure to implement multiple data targets in an APPLY statement in the executable section of a script (after the DEFINE statements).

In all of the following syntax examples, <DML spec x> represents the DML statements to be applied to data target x. For more information, see “APPLY Statement” in the Teradata Parallel Transporter Reference (B035-2436).

  1. Define an APPLY clause for the first target, specifying its consumer operator:
    APPLY <DML spec> TO OPERATOR <consumer_operator>
  2. Repeat Step 1 for a maximum of 32 targets, separating each APPLY clause by a comma. Omit the comma after the last one.
  3. Define one or more sources with any combination of the following:
    • Use a SELECT statement for each reference to a producer operator or database object.

    • Use a UNION ALL statement to combine multiple SELECT statements.

    Use the following syntax to define multiple sources:

    SELECT <column_list> FROM <producer_operator1>
UNION ALL
SELECT <column_list> FROM <producer_operator2>
UNION ALL
    SELECT <column_list> FROM <producer_operator3>

For more information about the required and optional attributes for the APPLY clause, see “APPLY Statement” in the Teradata Parallel Transporter Reference (B035-2436).

For more information about the UNION ALL option, see UNION ALL: Combining Data from Multiple Sources.