Example: JSON Type Parameter for a Java External Stored Procedure

Teradata Vantageā„¢ JSON Data Type

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1150-162K

This example shows a Java external stored procedure defined with a JSON type IN parameter.

REPLACE PROCEDURE json_proc1 (IN json_param JSON CHARACTER SET LATIN, 
                              OUT json_out JSON CHARACTER SET LATIN)
LANGUAGE JAVA
NO SQL
PARAMETER STYLE JAVA 
EXTERNAL NAME 'JSON_JAR:JavaXSP.json_proc1(java.sql.Clob,java.sql.Clob[])';


public static void json_proc1(java.sql.Clob json_clob, java.sql.Clob[] json_out)
  {
    json_out[0] = json_clob;
    return ;
  }