17.10 - Scenario 1: Data Stored as Avro with Column-Level Schema - 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)
Data stored as Avro with a column-level schema maps to an object container file. Follow the steps required to gather the necessary data and construct the object container file:
  1. Retrieve the schema used for the column by either selecting it out of the dictionary based on its name, or by selecting it from any instance of the column using the getSchema method of the DATASET data type. If the length of the schema is needed as well, the getSchemaSize method could be used.
  2. Retrieve all of the binary-encoded Avro values from the column using the getRawData or getRawDataLob methods of the DATASET data type. If the length of these binary-encoded Avro values is needed as well, the getRawDataSize method could be used.

Using the schema and binary-encoded Avro values obtained, you can construct an object container file using the Avro libraries.