17.10 - SchemaEqual Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - DATASET Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1198-171K
Language
English (United States)
SchemaEqual ( schema_expression, schema_expression )

Syntax Elements

schema_expression
Any expression that evaluates to a Teradata CHAR/VARCHAR/CLOB/JSON conforming to the schema specifications.
The following rules are for the Avro schema:
  • The two values passed into this function must be valid Avro schemas.
  • The SchemaEqual function imposes a more strict set of rules than SchemaMatch. To be equal, one of the following must occur:
    • Both schemas are arrays whose item types are equivalent (recursively determined if not primitive types).
    • Both schemas are maps whose value types are equivalent (recursively determined if not primitive types).
    • Both schemas are enums whose names or symbols match.
    • Both schemas are fixed with sizes and names that match.
    • Both schemas are records with the same name.

      Fields of both records must be declared in the same order, have the same names, and the same data types (recursively determined if not primitive types).

    • Both schemas are unions whose possible schema types are equivalent (recursively determined if not primitive types).
    • Both schemas have the same primitive type.
A schema's "doc" fields are ignored for the purposes of schema equivalence evaluation.