FNC_GetPhaseEx Usage Notes - Teradata Vantage - Analytics Database

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
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 constant arguments (where the return value of FNC_GetPhaseEx is TBL_MODE_CONST), FNC_GetPhaseEx is most useful to a table function that is passed 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.