tree: d245326511823d52ef53bb4d6a2d0fb56648051b [path history] [tgz]
  1. build_support/
  2. src/
  3. test/
  4. .gitignore
  5. CMakeLists.txt

MATLAB Library for Apache Arrow


This is a very early stage MATLAB interface to the Apache Arrow C++ libraries.

The current code only supports reading/writing numeric types from/to Feather files.

Building from source

Get Arrow and build Arrow CPP


Build MATLAB interface to Apache Arrow using MATLAB R2018a:

cd arrow/matlab
mkdir build
cd build
cmake ..

Non-standard MATLAB and Arrow installations

To specify a non-standard MATLAB install location, use the Matlab_ROOT_DIR CMake flag:


To specify a non-standard Arrow install location, use the ARROW_HOME CMake flag:


Build MATLAB interface to Arrow using MATLAB R2018b or later:

This may be preferred if you are using MATLAB R2018b or later and have encountered linker errors when using CMake.

Prerequisite: Ensure that the Arrow C++ library is already installed and the ARROW_HOME environment variable is set to the installation root.

To verify this, you can run:

>> getenv ARROW_HOME

This should print a path that contains include and lib directories with Arrow C++ headers and libraries.

Navigate to the build_support subfolder and run the compile function to build the necessary MEX files:

>> cd build_support
>> compile

Run the test function to execute the unit tests:

>> test

Try it out

Add the src and build directories to your MATLAB path

>> cd(fullfile('arrow', 'matlab'));
>> addpath src;
>> addpath build;

Write a MATLAB table to a Feather file

>> t = array2table(rand(10, 10));
>> filename = 'table.feather';
>> featherwrite(filename,t);

Read a Feather file into a MATLAB table

>> filename = 'table.feather';
>> t = featherread(filename);

Running the tests

>> cd(fullfile('arrow', 'matlab'));
>> addpath src;
>> addpath build;
>> cd test;
>> runtests .;