Example: Use JSON_Keys to Obtain Key Names for the Top Level Depth - 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™
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”