Scenario 1: Data Stored as Avro with Column-Level Schema

Teradata Vantageā„¢ DATASET Data Type

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1198-162K
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.