Example – Specifying Variables for Attributes - Parallel Transporter

Teradata® Parallel Transporter User Guide - 17.20

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Parallel Transporter
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-08-25
dita:mapPath
uzp1645128359760.ditamap
dita:ditavalPath
tvt1507315030722.ditaval
dita:id
B035-2445
Product Category
Teradata Tools and Utilities
DEFINE JOB CREATE_SOURCE_EMP_TABLE
(
      DEFINE OPERATOR DDL_OPERATOR
      DESCRIPTION 'Teradata Parallel Transporter DDL Operator'
      TYPE DDL
      ATTRIBUTES
       (
          VARCHAR TdpID          = @TdpId,
          VARCHAR UserName       = @MyUserName,
          VARCHAR UserPassword   = @MyPassword
);

      APPLY
          ('DROP TABLE SOURCE_EMP_TABLE;'),
          ('CREATE TABLE SOURCE_EMP_TABLE(EMP_ID INTEGER, EMP_NAME CHAR(10));'),
          ('INSERT INTO SOURCE_EMP_TABLE(1,''JOHN'');'),
          ('INSERT INTO SOURCE_EMP_TABLE(2,''PETER'');')
      TO OPERATOR (DDL_OPERATOR);
);

In this example, the DDL operator issues two DDL and two DML statements that create a table and then populates that table with two rows. The values of the TdpId, UserName, and UserPassword operator attributes are specified as job variables.