Ambiguity Between a JSON Dot Notation Reference and References to Other Database Objects - 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 syntax for JSON dot notation, a Teradata Vantage ARRAY type element reference, and a fully or partially qualified column reference is similar. This creates potential ambiguity in the following cases:

  1. Ambiguity between a Teradata Vantage ARRAY type element reference and a JSON type array reference
  2. Ambiguity between a fully or partially qualified column reference and a JSON type dot notation reference
When there is ambiguity, the default interpretation of the syntax is as follows:
  • For case 1: The syntax is interpreted as a Teradata Vantage ARRAY type element reference.
  • For case 2: The syntax is interpreted as a fully or partially qualified column reference.

Handling of these potential ambiguities is described in more detail in the following sections.

To ensure that a JSON dot notation reference is not ambiguous, fully qualify a JSON column being referenced. Alternatively, you can use the JSONExtract, JSONExtractValue, or JSONExtractLargeValue methods to retrieve entities of a JSON instance.