Using Multiple Source Schemas
A single script often requires two schemas, one each for the source and target. It is also possible to use multiple schemas for the source data if all rows are UNION-compatible. Two schemas are UNION-compatible if their corresponding columns have exactly the same data type attributes (type, length, precision and scale); that is, other than their column names, the schemas are identical. If the schemas are UNION-compatible Teradata PT combines data from the sources, each being extracted by a different producer operator using a different schema, into a single output data stream using its UNION ALL feature. For information, see “UNION ALL: Combining Data from Multiple Sources” on page 221.
Example : Multiple Schemas in a Job Script
DEFINE SCHEMA ATTENDEES
DESCRIPTION 'Employees who attended the training session'
DEFINE SCHEMA ABSENTEES
DESCRIPTION 'Employees who failed to attend the training session'
DEFINE SCHEMA PRESENTERS
DESCRIPTION 'Employees who gave presentations at the training session'
Explanation of Multiple Schema Example
Consider the following when referring to the proceeding multiple schema example: