Skip to content
MATLAB interface for Apache Avro files.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Software Release 0.7.0 to Apr 25, 2019
LICENSE.TXT Release 0.7.0 to Apr 25, 2019

MATLAB® Interface for Apache Avro


MathWorks Products (

  • Requires MATLAB release R2017b or newer

3rd Party Products:

For building the JAR file:


Apache Avro™ is a data serialization system. Avro provides a compact, fast, binary data format and simple integration with dynamic languages. Avro relies heavily on schemas. When data is stored in a file, the schema is stored with it, so that files may be processed later by any program.

The MATLAB interface for Apache Avro provides for reading and writing of Apache Avro files from within MATLAB. Functionality includes:

  • Read and write of local Avro files
  • Access to metadata of an Avro file


Installation of the interface requires building the support package (JAR file) using Maven.

Before proceeding, ensure that the below products are installed:
a) Java SDK
b) Maven

The links to download these products are provided in the section 3rd party products.

Please see the documentation for detailed installation instructions. To get started quickly:

Build the JAR file

To install the interface, first build the JAR file.

cd Software/Java
mvn clean package

The maven build places the Avro package in the location /Software/MATLAB/lib/jar/. Note the full path to the JAR file as this should be added to the static path in the next step.

Install the MATLAB package

Open MATLAB and install the support package.

cd Software/MATLAB

The startup script checks if the required packages are added to the static path. To set the static path, see detailed instructions to install.

Getting Started

To write a variable to an Avro file:

data = randn(1e2,5);
avrowrite('tmp.avro', data);

The same file can be read with

tmp = avroread('tmp.avro');

A few unit tests are provided in the Software/MATLAB/test/unit folder. These can be run with

cd Software/MATLAB/test/unit;

For more details, look at the Basic Usage document.


See documentation for more information.


The license for MATLAB interface for Avro is available in the LICENSE.TXT file in this GitHub repository. This package uses certain third-party content which is licensed under separate license agreements. See the pom.xml file for third-party software downloaded at build time.

Enhancement Requests

Provide suggestions for additional features or capabilities using the following link:



You can’t perform that action at this time.