JSON Data Type | Storage Formats | VantageCloud Lake - Storage Formats for the JSON Data Type - 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
JSON data can be stored in the following formats:
  • Text (LATIN or UNICODE)
  • Binary JSON (BSON)
  • Universal Binary JSON (UBJSON)

The default storage format is text in the character set specified (or the default character set for the user).

You can use the optional STORAGE FORMAT clause to specify that the JSON data be stored in one of the binary formats (BSON or UBJSON). This clause can only be used in the following cases:
  • As an attribute of a table column
  • As part of a JSON data type declaration in a CAST expression
  • As an optional parameter to the JSON constructor

You can use HELP COLUMN to display the storage format of a JSON column.

You cannot define a JSON type with both a STORAGE FORMAT clause and a CHARACTER SET clause. For JSON data stored in a binary format, the character set for this data when exported as text is UNICODE. Therefore, no CHARACTER SET clause is needed for these formats.