Usage Notes - Analytics Database - Teradata Vantage

SQL External Routine Programming

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
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢

FNC_GetJSONInfo takes a JSON type instance as an input argument. The JSON type instance is passed to the function as a JSON handle. The function returns:

  • The maximum possible length, in bytes, of the JSON type instance specified by jsonHandle. This information is returned in the maxLength parameter.
  • The character set of the JSON type instance specified by jsonHandle. This information is returned in the charset parameter. The return value is one of the following as defined in sqltypes_td.h:
    • LATIN_CT
    • UNICODE_CT
  • An indication of whether or not the JSON data is stored as a LOB. This is specified by the numLobsparameter.

    Based on the numLobsvalue, the user can determine which FNC routines to use for reading and writing JSON data:

    • If the JSON data is not stored as a LOB, you must use FNC_GetInternalValue or FNC_SetInternalValue.
    • If the JSON data is stored as a LOB, you must use FNC_GetJSONInputLob or FNC_GetJSONResultLob together with the LOB FNC routines.