Scenario 2: Data Stored as Avro Without Column-Level Schema - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantageā„¢ DATASET Data Type

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1198-162K

Use data stored as Avro without a column-level schema to construct an object container file. You have three possibilities for constructing an object container file in this scenario.

The Schemas are the Same, Without a Column-Level Schema

Simply retrieve a schema from an instance, and use this to construct the object container file, following the guidelines of Scenario 1.

The Schemas are Different, But Compatible

Follow the required steps to gather the necessary data and construct the object container file:
  1. Determine the desired schema used to describe all binary-encoded Avro values that compose the object container file.
  2. Use the AvroProject method of the DATASET type to construct Avro instances with the desired schema.
  3. Retrieve only the binary-encoded Avro values from the instances created in step 2 using the getRawData or getRawDataLob methods of the DATASET data type. If the length of these binary-encoded Avro values is also needed,use the getRawDataSize method.

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

The Schemas are Different, But Not Compatible

Each schema must be isolated, along with any binary-encoded Avro values described by that schema. For each isolated pairing, follow the steps in Scenario 1 to produce an object container file.