Example: Use JSON_Keys to Obtain Key Names for the Top Level Depth

Teradata Vantage™ JSON Data Type

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1150-162K
The example uses JSON_KEYS to obtain the key names from the top level depth.
SELECT * from JSON_KEYS
(
ON (SELECT json_data FROM json_table) USING DEPTH(1))
AS json_data;
Result:
JSONKEYS
--------
“coord”
“sys”
“weather”
“base”
“main”
“wind”
“clouds”
“dt”
“id”
“name”
“cod”