JSON Data Type | JSON Shredding | VantageCloud Lake - JSON Shredding - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Vantage allows you shred JSON documents to extract the data and store the extracted data in relational format. The extracted data can be used to insert or update data in existing database tables.

For simple cases of shredding JSON data, you can use the INSERT JSON statement. This statement only supports shredding JSON documents stored in text format.

For more complex cases of shredding JSON data, Vantage provides the following:

JSON_TABLE
This table operator shreds data in a JSON document and creates a derived database table based on the shredded data.
TD_JSONSHRED is recommended for faster shredding of JSON documents that have large numbers of attributes or shred to large numbers of database records.
TD_JSONSHRED
This table operator shreds data in a JSON document, and creates a derived database table based on the shredded data. The operator accepts larger JSON documents and shreds the data significantly more quickly, but does not support the use of JSONPath expressions and supports fewer output data types.
JSON_SHRED_BATCH and JSON_SHRED_BATCH_U
These stored procedures use successive calls to JSON_TABLE to shred multiple JSON documents and create a conglomerate derived database table that can be used to load or update one or more existing database tables.
JSON_SHRED_BATCH operates on LATIN character set data and JSON_SHRED_BATCH_U operates on UNICODE data. Otherwise, the two procedures function identically.

The table operators and stored procedures operate on JSON documents stored in text or binary format.