Usage Notes - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantageā„¢

A table function calls FNC_GetPhaseEx before doing anything else.

Although FNC_GetPhaseEx can be used successfully by a table function that is passed in constant arguments (where the return value of FNC_GetPhaseEx is TBL_MODE_CONST), it is most useful to a table function that is passed in variable arguments (where the return value of FNC_GetPhaseEx is TBL_MODE_VARY).

The functionality that FNC_GetPhaseEx provides complements the HASH BY and LOCAL ORDER BY clauses that order input to table functions. For an example on how to order input arguments to a table function, see Ordering Input Arguments to Table UDFs.

FNC_GetPhaseEx also provides users with more control of table phase transitions when developing table functions. Users can reduce the number of phase transitions required during execution of a table function, thus reducing the number of UDF invocations and improving table function performance.