15.10 - Example: Use JSON_Keys to Obtain Key Names for the Top Level Depth - Teradata Database

Teradata Database Teradata JSON

Product
Teradata Database
Release Number
15.10
Published
December 2015
Language
English (United States)
Last Update
2018-06-05
dita:mapPath
TeradataJSON_15_10.ditamap
dita:ditavalPath
ft:empty
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”