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

A table function is invoked in the FROM clause of an SQL SELECT statement and returns a table a row at a time in a loop to the SELECT statement. The function can produce the rows of a table from the input arguments passed to it or by reading an external file or message queue.

Like a method that implements a scalar or aggregate UDF, the parameter list for a method that implements a table UDF includes input parameters that map to the input arguments of the UDF when it is specified in an SQL statement.

Unlike a method that implements a scalar or aggregate UDF, the parameter list of a method that implements a table UDF includes output parameters that map to the columns in the result rows that the table UDF produces. Another difference is that the return type for a method that implements a table UDF is always void.

A table function can have:
  • 128 input parameters
  • As many output parameters as defined by the RETURNS TABLE clause of the CREATE FUNCTION or REPLACE FUNCTION statement for the table function.

    The number of output parameters is limited by the maximum number of columns that can be defined for a regular table.