Altova XMLSpy 2025 Enterprise Edition

Avro, Avro Schema

Home Prev Top Next

Apache Avro™ is a system for serializing data in a compact binary format. An Avro data structure is defined in an Avro schema, which is written in JSON format. In actual deployment scenarios, an Avro document is typically serialized as a binary file which contains not only the Avro data structures but also the Avro schema that is used to define these structures. The Avro binary thus carries both the data and the data structure's definition (the Avro schema). Avro data can, however, also be serialized as JSON; in this case the Avro data (in a JSON file) references an external Avro schema.

 

XMLSpy supports Apache Avro™ 1.8.1.

 

 

In XMLSpy, the following Avro support is available:

 

You can edit Avro data (as .json JSON documents) in Text View and Grid View; both views provide intelligent editing features. The data document can be assigned an Avro schema and validated against it.

You can edit Avro schemas (as .avsc Avro Schema documents) in Text View and Grid View. Avro schemas can be validated against the Avro schema specification, and the views provide intelligent editing features.

You can view Avro binary instances (.avro files) in Avro View, which displays Avro data blocks in a tabular grid.

 

 

Altova's RaptorXML editions provide further Avro support:

 

Avro data (JSON-serialized; .json file) validation (against an Avro schema)

Avro data (binary-serialized; .avro file) validation

Avro schema (typically .avsc file) validation (against Avro schema specification)

Extraction of Avro schema from Avro binary

 

Opening existing Avro documents and creating new

In the Options | File types section (screenshot below), you can set the default view in which the different types of Avro documents (JSON data format, Avro schema, Avro binary) are opened. You can switch between available views at any time.

FileTypesAvro

Document type

File extension

Conformance

Available views

Avro data in JSON format

.json

JSON conformant | JSON

Text View, Grid View

Avro schema

.avsc

Avro conformant | Avro Schema

Text View, Grid View

Avro data in binary file

.avro

Avro conformant | Avro Binary

Avro View

 

Note the following points:

 

Existing documents and new documents of a selected type will open in the default view you select in the File types section.

Avro binaries can be viewed only in Avro View, which is a read-only view. When a file type is defined to be Avro-conformant, the only available view is Avro View.

If you want XMLSpy to read files of a certain file extension as one of the Avro document types listed above, then add this new file extension and assign it the relevant conformance.

To create a new document, click File | New, and select the document type you want. Avro binaries, being binaries, cannot of course be created in this way; they can only be read in Avro View.

 

© 2018-2024 Altova GmbH