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

DATASET Data Type

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
bka1628112240653.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ekk1458586304878
lifecycle
latest
Product Category
Teradata Vantageā„¢
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.