JSON_COMPRESS/JSON_DECOMPRESS Example | VantageCloud Lake - Example: Compressing JSON Type 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 JSON data in the "json_col" column is compressed using the JSON_COMPRESS function. The compressed data is uncompressed using the JSON_DECOMPRESS function.

CREATE TABLE temp (
  id       INTEGER, 
  json_col JSON(1000) 
           CHARACTER SET LATIN 
           COMPRESS USING JSON_COMPRESS 
           DECOMPRESS USING JSON_DECOMPRESS);