Method Signature for 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™

Syntax

import com.teradata.fnc.*;
import java.io.*;
import java.sql.*;

public class  class_name  {
  ...
  public static  result_type   method_name  (
   Phase phase,
   Context[] context,
   [ input_parameter_specification [,...] ]
  )
  {
    ...
  }
}
input_parameter_specification
type *input_parameter

Syntax Elements

result_type
a Java primitive or class corresponding to the SQL data type in the RETURNS clause of the corresponding CREATE FUNCTION statement.
phase
a required parameter that lets Vantage pass in the current aggregation phase. The aggregation phase determines how the method processes the data passed in. For details on the Phase class, see com.teradata.fnc.Phase.
context
a required parameter that provides a way for the method to access intermediate storage to combine data passed in during the various aggregation phases. For details on the Context class, see com.teradata.fnc.Context.
input_parameter_specification
[Optional] Type and name of an input parameter in the CREATE FUNCTION definition. Each input parameter in the definition must have a corresponding input_parameter_specification. The maximum number of input parameters is 128.
The type is a Java primitive or class that corresponds to the SQL data type of input_parameter.