JSON Data Type | JSON Type and UDFs | VantageCloud Lake - Using the JSON Type with UDFs - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
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.