USING Clause Extension for the Schema Column - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide

Product
Parallel Transporter
Release Number
16.20
Published
November 2020
Language
English (United States)
Last Update
2020-11-19
dita:mapPath
ghk1527114222323.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2516
lifecycle
previous
Product Category
Teradata Tools and Utilities

The optional keyword "USINGEXTENSION" ('usingExtension'):) specifies the USING clause extension for a schema column.

The USINGEXTENSION option can be used to load data into a temporal table using the Teradata PT Update operator. TPTAPI Users are allowed to submit temporal extensions, which enables the usage of extended MultiLoad protocol with temporal columns.

For data loading, the operator generates the USING clause based on the schema. The operator sends the USING clause to the Teradata Database. The USING clause identifies the layout of the data rows.

The operator adds the UsingExtension value to the column when generating the USING clause. The operator does not validate the UsingExtension value, which is validated by the Teradata Database.

The USINGEXTENSION option applies only to the Teradata PT Update operator when the job is using the extended MultiLoad protocol.

The USINGEXTENSION option is ignored when the TPTAPI application is using the traditional MultiLoad protocol. Also, the USINGEXTENSION option is ignored for other Teradata PT operators.

For more information on how to use the USINGEXTENSION option, see "Temporal Tables" in Teradata Parallel Transporter Reference (B035-2436).

Usage and Example

The syntax shown below with 'AddAttributeForColumn(...)' and the 'USINGEXTENSION' option allows users to pass in user-defined 'extensions' from TPTAPI application to the Operator.

Example code snippet in TPTAPI application:

Connection *conn = new Connection();
Schema * schema  = new Schema((char*)"input");
	 schema -> AddColumn((char*)"DOJ", TD_PERIOD_DATE, 8);
	 schema -> AddAttributeForColumn((char*) "DOJ",(char*) 	
"USINGEXTENSION",(char*) "AS VALIDDATE",12,TD_VARCHAR);
conn -> AddSchema(schema); 

To support this, a new method AddAttributeForColumn(...) has been introduced in the Schema Class. For more information on this new method, see "AddAttributeForColumn(...)" in the table that describes schema class objects in Schema Class.