Defining Functions that Use the TD_ANYTYPE Type | Java UDFs | Teradata Vantage - Defining Functions that Use the TD_ANYTYPE Type - 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ā„¢
Teradata provides a parameter data type called TD_ANYTYPE that can accept any system-defined data type. You can specify TD_ANYTYPE as a data type for:
  • Input parameters in scalar, aggregate and table functions
  • Result parameters in scalar and aggregate functions
  • IN, INOUT, or OUT parameters in external stored procedures
You cannot use TD_ANYTYPE:
  • As the return type in table functions
  • As input parameters and return value in UDMs because you cannot write UDMs in Java
  • To represent UDT parameters because UDT parameters are not supported in Java routines

The parameter attributes and return type are determined at execution time based on the actual arguments passed to the routine.

The TD_ANYTYPE parameter is mapped to java.lang.Object in the Java routine. You must specify java.lang.Object as the Java parameter type corresponding to the TD_ANYTYPE parameter in the UDF.