This chapter page describes the Avro support that has been added to the for Ultra Format Definition Language (UFDL). This addition functionality enables you to compile Avro definitions, and to encode data into, and decode it from the Avro format. A schema in Avro is represented in JSON. You can implement non-protocol data issues in an Analysis agent.
Overview
In you manage Avro parsing in UFDL is managed by applying the the avro
_block
construct.
Code Block | ||||
---|---|---|---|---|
| ||||
avro_block { <avro json schema> }; |
The output of from an Avro encoder represents a single Avro record, not a complete Avro data file. To deserialize de-serialize these records using a third party tool, you must add the correct Avro header to the records based on the description of Avro provided in the link below.
The full description of the Avro language can be found at: https://avro.apache.org/docs/current/spec.html.
...
Complex Type | Notes |
---|---|
record | Supports the attributes: The |
enum | Supports the attributes: name , namespace, doc (optional), aliases (optional), symbols . |
array | Supports the attribute: items |
map | Supports the attribute: values |
union | Implemented as a record with all types set to optional. If two values are set, both are encoded. If no values are set, none are encoded. To specify a union value, you must use |
fixed | Supports the attributes: |
...
Note | ||
---|---|---|
| ||
Use the |
Limitations
The following limitations apply for the Avro support in:
- Line and Column are not fully implemented.
- No string values are permitted in APL for for the
enum
type. - Encoding the Avro object container file is not supported.
aliases
is are not fully supported.default
is not fully supported.- Cross references to other Ultra definitions are not supported.
array of arrays
is is not correctly implemented. E g For example,array of array of x
is implemented witharray of y
, wherey
is a record with onevalue
field. Thisvalue
field is anarray of x
.map of x
is implemented via anarray of y
, wherey
is a record with two fields:key
andvalue
, wherevalue
isx
.
...
Avro Format Example
To encode an Arvo data file, a format definition is included in the Ultra avro
_block
block in the Ultra format.
...