Result Types - 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ā„¢

JSON_KEYS performs a search on the JSON instance to the specified depth and returns a VARCHAR column of key names.

If a JSON array is present in the document, one result per index of each array is generated.

All results are given according to their "path" in the JSON document. Therefore, the output corresponding to a nested key will contain all of the parent keys, in addition to itself.

If you specify the USING QUOTES ('Y') clause, the key names in the result set are enclosed in double quotation marks. This is the default behavior and allows you to copy and paste a path into an SQL statement, using the path as a dot notation entity reference on a JSON document, without any potential for improper use of SQL keywords.

If you specify the USING QUOTES ('N') clause, the key names in the result set are not enclosed in double quotation marks. This allows you to use the output as input to one of the JSON extraction methods, such as JSONExtractValue.

JSON_KEYS returns an empty string when the input to the table operator is an empty JSON object.