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

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.