17.00 - Query Banding Vantage Feature - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide

prodname
Parallel Transporter
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-2516-220K

Starting with V12.0 Teradata Database, the query banding feature provides a user-defined query band expression that is set for every SQL session connected by the Teradata PT driver. A query band expression is a set of name-value pairs that identify a query’s originating source. In the expression, each name-value pair is separated by a semicolon and the expression ends with a semicolon. The following is an example of a valid query band expression:

a=1;b=2;c=3;d=4;

If the TD_QUERY_BAND_SESS_INFO is set, the following request will be sent by every SQL session connected by the Teradata PT driver:

SET QUERY_BAND =’<User-Defined Query Band Expression>’ FOR SESSION;

Setting the TD_QUERY_BAND_SESS_INFO attribute in jobs running against non-supported versions of Teradata Database causes a non-fatal error. No error code is returned to the user during initiation and the job is allowed to proceed. The log table will not be dropped at the end of the job and the TD_Evt_ExitCode event returns a warning value of four instead of the normal success value of zero if queried. In this case, error information can be found in the trace file.