Phases of a Variable Mode Table UDF - 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ā„¢

Vantage repeatedly invokes the Java method for a variable mode table UDF, allowing the method to pass through different phases where it initializes itself, accesses system resources, and builds output rows. The method uses Tbl.getPhase() or Tbl.getPhaseEx() to determine which phase it is in and what action to take.

A method that uses Tbl.getPhase() passes through the following phases:



Alternatively, a table UDF that needs to know when it is passed in the last qualified row on an AMP (perhaps because the UDF does not return a row until after it processes all of the input rows) can use Tbl.getPhaseEx() with the TBL_LASTROW option and pass through the following phases:



For details on implementing each phase of a variable mode table UDF, see Implementation Guidelines.