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 - 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 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 following 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.