Scenario 1: Data Stored as Avro with Column-Level Schema - Advanced SQL Engine - Teradata Database

DATASET Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
des1556232910526.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1198
lifecycle
previous
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.