15.10 - Using Multiple Source Schemas - Parallel Transporter

Teradata Parallel Transporter User Guide

prodname
Parallel Transporter
vrm_release
15.10
category
User Guide
featnum
B035-2445-035K

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'
(
  ATTENDEE_NAME     CHAR(24),
  TRAINING_FEEBACK  VARCHAR(256)
);       
        
DEFINE SCHEMA ABSENTEES 
DESCRIPTION 'Employees who failed to attend the training session'
(
  ABSENTEE_NAME  CHAR(24),
  EXCUSE         VARCHAR(256)
); 
          
DEFINE SCHEMA PRESENTERS 
DESCRIPTION 'Employees who gave presentations at the training session'
(
  PRESENTER_NAME      CHAR(24),
  PRESENTATION_TOPIC  VARCHAR(128)
);

Explanation of Multiple Schema Example

Consider the following when referring to the proceeding multiple schema example:

  • Each schema must have a unique name within the job script.
  • Schemas ATTENDEES and ABSENTEES are UNION-compatible. Schema PRESENTERS is not UNION-compatible, because VARCHAR(128) is not identical to VARCHAR(256).