JSON_COMPRESS/JSON_DECOMPRESS Example | Teradata Vantage - Compressing JSON Type Data Example - Advanced SQL Engine - Teradata Database

JSON Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
gzn1554761068186.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1150
lifecycle
previous
Product Category
Teradata Vantageā„¢

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