UNION ALL: Combining Data from Multiple Sources
UNION ALL takes data from two or more sources, obtained by different producer operators working in parallel, and combines the output data rows into a single logical data stream that is applied to the desired data target(s). Since all of the operators involved in a UNION ALL operation are working in parallel, the time to acquire source data is significantly reduced.
The following producer operators are typically used with UNION ALL:
Usage Requirements
To be compatible with UNION ALL one of the following must be true:
or,
Code Example
SELECT * FROM OPERATOR (REGION_1_ACCOUNTS_READER)
UNION ALL
SELECT * FROM OPERATOR (REGION_2_ACCOUNTS_READER)
UNION ALL is used in a number of common job scenarios. For a typical application Example 1C in “Job Example 1: High Speed Bulk Loading into an Empty Table” on page 103.
For the sample script that corresponds to this job, see the following script in the sample/userguide directory
PTS00003: High Speed Bulk Loading from Two Flat Files to an Empty Teradata Database Using UNION ALL.