JSON_KEYS JSON Table Operator Syntax | VantageCloud Lake - JSON_KEYS Syntax - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
[TD_SYSFNLIB.] JSON_KEYS (
  ON (json_expr)
  [ USING name_value_pair [...] ]
) [AS] correlation_name

Syntax Elements

name_value_pair
{ DEPTH | QUOTES } (value)
TD_SYSFNLIB
The name of the database where the function is located.
json_expr
An expression that evaluates to correct JSON syntax. The expression can be a CHAR, VARCHAR, CLOB, or JSON representation of a JSON data type in LATIN or UNICODE.
AS
An optional keyword introducing correlation_name.
correlation_name
An alias for the input column specified by the ON clause.
ANSI SQL refers to aliases as correlation names. Aliases are also called range variables.
DEPTH
An optional clause that restricts the depth of the search. value is a positive integer that specifies the maximum depth for the search.
The default value is the maximum depth of the JSON instance.
For example, setting the depth to 1 gets the top level keys in the JSON instance.
QUOTES
An optional clause that specifies whether the key names in the result are enclosed in double quotation marks as follows:
  • If value is 'Y' or 'y', the key names in the result are enclosed in double quotation marks. This is the default if the USING QUOTES clause is not specified.
  • If value is 'N' or 'n', the key names in the result are not enclosed in double quotation marks.