Usage Notes - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
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.