How to do it...

  1. Connect to Teradata using SQLA or Studio.
  2. Create the following JSON table in your database:
CREATE VOLATILE TABLE JSON_TBL(EMP_id INTEGER, J1 JSON(1000))on commit preserve rows;
  1. Let's insert values into it:
INSERT INTO JSON_TBL VALUES
(1, NEW JSON('{"name" : "Roberts", "Month" : 1}')); 
  1. Let's see the snippet from SQLA:
  1. Now we will SELECT data from table we have created. The output will be written to the file on your desktop, as JSON data is stored in LOB. The following would be the output. Press Cancel to display the result in the result set in SQLA:
  1. Following would be the result set, when you press Cancel:
  1. Let's ...

Get Teradata Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.