USING Clause Extension for the Schema Column|USINGEXTENSION - USING Clause Extension for the Schema Column - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide - 17.20

Product
Parallel Transporter
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2022-10-11
dita:mapPath
fag1645201363032.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2516
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 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 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 ollowing syntax 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.