Ambiguity Between a JSON Entity Reference and References to Other Database Objects

Teradata Vantageā„¢ JSON Data Type

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1150-162K

The syntax for a JSON entity reference, a Teradata 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 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 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 entity reference is not ambiguous, you should fully qualify a JSON column being referenced. Alternatively, you can use the JSONExtract, JSONExtractValue, or JSONExtractLargeValue methods to retrieve entities of a JSON instance.