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.