Debugging a UDF | SQL External Routine Programming | Teradata Vantage - Debugging a User-Defined Function - 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
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢
When debugging a function, be sure your tests include the following:
  • Limit checks on the input values
  • Limit checks on the return value
  • Proper handling of NULLs
  • Division by zero
  • All memory acquired by malloc is freed
  • All open operating system handles are released/closed

The Teradata C/C++ UDF Debugger allows some user-defined functions to be debugged within the database on a development or test system. The debugger only supports C and C++ functions. For more information on the Teradata C/C++ UDF Debugger, see C/C++ Command-line Debugging for UDFs.

For other user-defined functions, debugging is limited after the function is installed in the database. You can use other debugging tools to verify their functionality, or run them on a stand-alone virtual machine and debug the UDF server processes that executes them.

For an example of how to run, test and debug your function outside of Vantage, see the Teradata Downloads article, Developing Database Extensions (UDFs, etc.).