Loading JSON Data Example | VantageCloud Lake - Example: Loading JSON Data - 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

In this example, the transform group settings for the user specify to use the TD_JSON_VARBYTE transform group. The following shows how you can load JSON data into the JSON column of the jsn_byte_bson table.

.logon NODEID/dr171210_vb,dr171210_vb;
 
DROP TABLE Error_11;
DROP TABLE Error_22;
 
CREATE TABLE jsn_byte_bson(
  s1 INTEGER NOT NULL
 ,s2 JSON (1000) STORAGE FORMAT BSON)
UNIQUE PRIMARY INDEX(s1);
 
DEFINE JOB TPT (
  a (INTEGER),
  b (VARBYTE(1000))
FILE=jsn_byte_bson;
 
BEGIN LOADING jsn_byte_bson ErrorFiles Error_11, Error_22 indicators;
 
INSERT INTO jsn_byte_bson VALUES(:a, :b);
END LOADING;
LOGOFF;