Aggregate UDFs - 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ā„¢

When an SQL statement specifies an aggregate UDF, Vantage invokes the Java method that implements the aggregate UDF once for each item in the group, passing the detail values of a group through the input arguments.

In addition to the parameters that map to the input arguments of the UDF when it is specified in an SQL statement, the method signature for an aggregate UDF includes two special parameters for arguments that Vantage passes in. One of the arguments that Vantage passes in tells the method which aggregation phase it was invoked in so that the method knows how to combine the data passed in. Another argument provides a context for the method to retain intermediate results that it accumulates during the aggregation phases.