Code Example - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Parallel Transporter
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2023-11-20
dita:mapPath
haz1691132518981.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
ana1478611373864
lifecycle
latest
Product Category
Teradata Tools and Utilities

The following macro was defined prior to execution:

create macro ins_row
(
    p1 integer,
    p2 varchar(32000)
)as(
   insert into table1
   (col1,col2)
   values(:p1,:p2);
);

For the Stream driver, add this EXECUTE statement to the DML group:

EXECUTE ins_row INSERT;

And this schema is built:

Schema * strSchema=new Schema(“input”);
strSchema->AddColumn(“col1”,TD_INTEGER,4);
strSchema->AddColumn(“col2”,TD_VARCHAR, 32000);
strConn->AddSchema(strSchema);