UDF Parameter Styles - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

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
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™
Customers using Vantage delivered as-a-service cannot create their own C++ and Java UDFs, UDMs, UDTs, or External Stored Procedures.

The following three parameter styles are all valid for external functions.

Style Description
SQL Uses indicator variables to pass arguments.

This is the default parameter style for all UDFs.

As a result, you can always pass nulls as inputs and return them in results. If a row-level security policy constraint permits nulls, then its parameter style must be SQL.

If the function executes a row-level security policy constraint, each input and output parameter for the function has a second indicator parameter. The following indicator parameter values apply.

  • If the indicator parameter value is -1, its corresponding value parameter is null.
  • If the indicator parameter value is 0, its corresponding value parameter is not null.

No other values are valid for an indicator parameter in a row-level security policy constraint UDF.

TD_GENERAL Uses parameters to pass arguments.

Can neither be passed nulls nor return nulls. If a row-level security policy constraint does not permit nulls, then its parameter style must be TD_GENERAL.

If the function executes a row-level security policy constraint, there are no indicator parameters.

JAVA If the Java function must accept null arguments, then the EXTERNAL NAME clause must include the list of parameters and specify data types that map to Java objects.

PARAMETER STYLE JAVA must be specified for all Java functions.

A row-level security policy constraint function cannot have a parameter style of JAVA.