traceWrite(java.lang.Object[] argv) - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™

Called by a UDF or external stored procedure to write trace output into a temporary trace table defined by a CREATE GLOBAL TEMPORARY TRACE TABLE statement.

Each object in the argv array corresponds to a column in the trace table (beyond the first two mandatory columns). The order of the objects in the argv array matches the order of the columns in the trace table.

To use DbsInfo.traceWrite to write trace output into a temporary trace table, follow these steps:

  1. For each column in the trace table, create a Java object that maps to the SQL data type of the column and set the value of the object to the value you want to write to the column.

    For details on how Java objects map to the SQL data types of a temporary trace table column, see TraceObj Constructor.

  2. Wrap each Java object using the TraceObj wrapper class.

    For details on TraceObj, see com.teradata.fnc.TraceObj.

  3. Put the TraceObj objects into an Object array and pass the array to DbsInfo.traceWrite.

    DbsInfo.traceWrite converts the value of each object in the array to its corresponding SQL data type value and writes the value to the trace table.

FOR more information on … SEE …
debugging a Java UDF or external stored procedure using trace tables Debugging Using Trace Tables.
CREATE GLOBAL TEMPORARY TRACE TABLE Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.