Data Type Encoding - 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ā„¢

Some of the client and server interfacing parcels such as DataInfo (parcel flavor 71), DataInfoX (parcel flavor 146), PrepInfo (parcel flavor 86), PrepInfoX (parcel flavor 125) and StatementInfo (parcel flavor 169) return the data type of the field. All parcels that contain the data type information use the following encoding for the JSON data type. The encoding numbers defined follow the pattern for existing data types. For example, Nullable number is non-Nullable value + 1 and stored procedure IN parameter type number is 500 + non-nullable number.

Data Type NULL Property Stored Procedure Parameter Type
  Non-nullable Nullable IN INOUT OUT
Large JSON Data Inline 880 881 1380 1381 1382
Large JSON Data Locator 884 885 1384 1385 1386
Large JSON Data Deferred 888 889 1388 1389 1390

These codes are sent from server to client, and are accepted by server from client in the parcels described in the following sections. The only restriction is the type may not be used in the USING clause. VARCHAR/CLOB can be used in the USING clause and when necessary, this data is implicitly cast to the JSON type.