16.20 - Using the JSON Type with UDFs - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ JSON Data Type

Teradata Database
Teradata Vantage NewSQL Engine
March 2019
Programming Reference
You can create a UDF containing one or more parameters and return type that are a JSON data type. The JSON type is supported for the following types of UDFs:
  • Scalar and aggregate UDFs, table functions, and table operators written in C, C++, or Java.
  • SQL UDFs

For SQL UDFs, the RETURN clause can be an SQL statement that evaluates to the JSON data type.

You can specify the JSON type with the STORAGE FORMAT specification to pass binary JSON data to an external routine.

JSON FNC functions and Java classes and methods are provided to enable a UDF, UDM, or external stored procedure to access and set the value of a JSON parameter, or to get information about the JSON type parameter. For information about these functions and methods, see Teradata Vantageā„¢ SQL External Routine Programming , B035-1147 .