15.10 - Example: JSON Type Parameter for a Java External Stored Procedure - Teradata Database

Teradata Database Teradata JSON

Product
Teradata Database
Release Number
15.10
Published
December 2015
Language
English (United States)
Last Update
2018-06-05
dita:mapPath
TeradataJSON_15_10.ditamap
dita:ditavalPath
ft:empty

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 ;
  }