After data is stored in Sift, it can be exported into MATLAB for analysis. Sift recommends using the official Python client via MATLAB’s built-in Python interface. If your team cannot use Python, the REST API is also supported natively from MATLAB.Documentation Index
Fetch the complete documentation index at: https://docs.siftstack.com/llms.txt
Use this file to discover all available pages before exploring further.
Before you begin
To export data from Sift to MATLAB programmatically, make sure you have the following:- A Sift API key and your base URLs.
- The ID of the Run and the IDs of the Channels you want to export. You can find these in the Sift UI or by querying the Runs and Channels endpoints.
How exporting to MATLAB works
Sift provides two programmatic export mechanisms: data querying, which returns Channel data immediately in the response, and export data to file, which processes the export in the background and produces a downloadable file. Both mechanisms are available through the two paths that allow you to import data into MATLAB.Path 1: MATLAB to Python bindings
Path 1 uses MATLAB’s built-in Python interface to call Sift’s official Python client (sift-stack-py) directly from your MATLAB environment. The py. prefix on any MATLAB command is what invokes that interface.
Set up the Python environment
Path 1 requires Python 3.8 or later installed on the same machine as MATLAB. Both mechanisms in Path 1 rely on the Sift Python client running inside a Python virtual environment that MATLAB can access. Complete the following steps once before running either mechanism. This sets up the Python environment, points MATLAB to it, and stores your Sift credentials.Install the required packages
With the virtual environment active, install the Sift client and its dependencies:
Point MATLAB to your virtual environment
In the MATLAB Command Window, run:Replace
/path/to/sift-matlab-env with the full path to the virtual environment you created. To find it, run which python in your terminal while the virtual environment is active.You only need to do this setup once. MATLAB will remember the Python environment across sessions.Verify your Python environment
Confirm MATLAB is pointing at the correct Python environment:If the wrong environment is selected, point MATLAB at the correct one:
Mechanism 1: Data querying
List Channels and query data
Use client.runs.find to find a single Run by name, or client.runs.list_ to search across multiple Runs. When a Run is provided to client.channels.get_data_as_arrow, the Run’s time range is used automatically so Use Option 2 to search across multiple Runs:Find Channels scoped to the Run using client.channels.list_:If you already know the Channel ID, you can use client.channels.get instead:Query data for the full Run:To query a specific time window within the Run, pass
start_time and end_time are not needed.Find the Run. Use Option 1 to find a single Run by name:start_time and end_time:arrow_result is a Python dict where each key is a Channel name and the value is an Apache Arrow table.Write to Parquet and load into MATLAB
Data returned by get_data_as_arrow comes back as a Python object that MATLAB cannot consume directly. Writing it to a Parquet file and loading it with The output will look similar to this:You will see a warning about table variable names being modified. This is expected. MATLAB automatically renames the internal timestamp column from
parquetread converts it into a format MATLAB understands.Replace YOUR_CHANNEL_NAME with the exact name of your Channel as it appears in Sift, for example temperature.__index_level_0__ to x__index_level_0__ to comply with MATLAB identifier rules. The timetable is created correctly and the warning can be safely ignored.Mechanism 2: Export data to file
Submit the export job
Submit the job using client.data_export.export. The
output_format parameter accepts ExportOutputFormat values including CSV, PARQUET, and SUN.Wait for the job and download the result
Use
client.jobs.wait_and_download with show_progress set to false to avoid the progress bar conflict with MATLAB’s Command Window:Path 2: REST API via webread
Path 2 uses MATLAB’s nativewebread and webwrite functions to call the Sift REST API directly. No Python installation is required.
Mechanism 1: Data querying
Set your Sift credentials
If you already completed the Path 1 setup, your If you are starting with Path 2 directly, create a Then load the credentials:
.env file already contains the required credentials. Run the following to load them:.env file in a text editor and save it to MATLAB’s current working directory. Run pwd in the MATLAB Command Window to find that location. Add the following to the file:Query Channel data
The examples below use If
webwrite to call POST /api/v2/data (GetData). See the GetData endpoint reference for the full schema.result.nextPageToken is non-empty, resend the request with pageToken set to that value to retrieve the next page.Mechanism 2: Export data to file
Submit the export job
The examples below use
webwrite to call POST /api/v1/export (ExportData) and GET /api/v1/export//download-url (GetDownloadUrl). See the ExportData endpoint reference and the GetDownloadUrl endpoint reference for the full schema.Unzip and load into MATLAB
outputFormat you specified when submitting the job, for example sift_data_export_2026-05-19_172841.csv for CSV. Run the following to see the exact filename:runName|assetName|temperature. To rename a column after loading:Verify
Once data is loaded into MATLAB, confirm it looks correct. Usett for timetables (Mechanism 1) and T for tables (Mechanism 2).
-
Check the data is not empty:
-
Check the column names match your expected Channel names:
-
Check the timestamp range covers what you requested:
-
Preview the first few rows: