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 v1 files.
To build the MATLAB Interface to Apache Arrow from source, the following software must be installed on the target machine:
- MATLAB
- CMake
- C++ compiler which supports C++17 (e.g.
gccon Linux,Xcodeon macOS, orVisual Studioon Windows) - Git
To set up a local working copy of the source code, start by cloning the apache/arrow GitHub repository using Git:
$ git clone https://github.com/apache/arrow.gitAfter cloning, change the working directory to the matlab subdirectory:
$ cd arrow/matlabTo build the MATLAB interface, use CMake:
$ cmake -S . -B build
$ cmake --build build --config ReleaseTo install the MATLAB interface to the default software installation location for the target machine (e.g. /usr/local on Linux or C:\Program Files on Windows), pass the --target install flag to CMake.
$ cmake --build build --config Release --target installAs part of the install step, the installation directory is added to the MATLAB Search Path.
Note: This step may fail if the current user is lacking necessary filesystem permissions. If the install step fails, the installation directory can be manually added to the MATLAB Search Path using the addpath command.
There are two kinds of tests for the MATLAB Interface: MATLAB and C++.
To run the MATLAB tests, start MATLAB in the arrow/matlab directory and call the runtests command on the test directory:
>> runtests test;To enable the C++ tests, set the MATLAB_BUILD_TESTS flag to ON at build time:
$ cmake -S . -B build -D MATLAB_BUILD_TESTS=ON
$ cmake --build build --config ReleaseAfter building with the MATLAB_BUILD_TESTS flag enabled, the C++ tests can be run using CTest:
$ ctest --test-dir buildIncluded below are some example code snippets that illustrate how to use the MATLAB interface.
>> t = array2table(rand(10, 10));
>> filename = 'table.feather';
>> featherwrite(filename,t);>> filename = 'table.feather';
>> t = featherread(filename);