JSON_KEYS Result Types - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

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 contains the nested key itself and all parent keys.

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.