Sending Data to Multiple Targets - Parallel Transporter

Teradata® Parallel Transporter User Guide

Product
Parallel Transporter
Release Number
17.10
Published
February 2022
Language
English (United States)
Last Update
2022-02-04
dita:mapPath
kyx1608578396289.ditamap
dita:ditavalPath
tvt1507315030722.ditaval
dita:id
B035-2445
lifecycle
previous
Product Category
Teradata Tools and Utilities

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.