Example: Compressing JSON Data Types - Analytics Database - Teradata Vantage

SQL Operators and User-Defined Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-05
dita:mapPath
xub1628111590556.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
drp1544241916620
lifecycle
latest
Product Category
Teradata Vantage™

Although you can call the function directly, JSON_COMPRESS is often used with the COMPRESS USING phrase to compress table columns. In the following table, the JSON data in the json_col column is compressed using the JSON_COMPRESS function.

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