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

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
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 selecting the schema from the dictionary based on its name, or by selecting the schema from any instance of the column using the getSchema method of the DATASET data type. If you also need the schema length, use the getSchemaSize method.
  2. Retrieve all of the binary-encoded Avro values from the column using the getRawData or getRawDataLob methods of the DATASET data type. If you also need the length of these binary-encoded Avro values, use the getRawDataSize method.

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