Usage Notes - 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 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.