Variable Mode Table UDFs | SQL External Routine Programming | Teradata Vantage - Variable Mode Table UDFs - 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ā„¢

This section provides guidelines on how to write a Java method for a table UDF that can handle an invocation where the SELECT statement specifies columns from a derived table as input arguments. For example, the following statement invokes table_function_2 using column_1 from the preceding derived table with the t1 correlation name:

SELECT *
FROM ( SELECT column_1
       FROM table_1
       WHERE column_2 > 65 ) AS t1,
     TABLE (table_function_2(t1.column_1)) AS t2 (c1, c2, c3)
WHERE t1.column_3 = t2.c3;
Although this section discusses how to implement a method that only handles variable input arguments, you can write a method that can handle constant and variable input arguments. For details on constant mode table UDFs, see Constant Mode Table UDFs.