Skip to content

Repository files navigation

MATLAB Interface for Databricks

View MATLAB Interface for Databricks on File Exchange

MATLAB® Interface for Databricks® enables engineers and data scientists to develop, scale, and deploy MATLAB and Simulink® workflows directly on Databricks, operationalizing algorithms and simulations in production pipelines and digital twins.

What You Can Do

Workflow What it solves Learn more
Query Databricks data Read Delta tables from MATLAB using SQL via JDBC or ODBC — no Spark™ knowledge needed. JDBC · ODBC
Develop with Databricks Connect Run Spark operations interactively from MATLAB, filter and sort large datasets on the cluster, then pull results locally for analysis. Databricks Connect
Deploy MATLAB to Spark Compile MATLAB functions to Python® wheel files with MATLAB Compiler SDK™ and run them as jobs on a Databricks cluster — no desktop in the loop for production. Job Workflow
Manage Databricks resources Create and control clusters, upload files to Unity Catalog volumes, manage secrets, execute SQL, and run jobs — all from MATLAB scripts. REST APIs
Run MATLAB on Databricks Run MATLAB Desktop or Runtime directly on a Databricks cluster in Docker® containers, accessed via a browser. Reference Architecture

MathWorks Products (mathworks.com)

Requires MATLAB release R2024b or newer

3rd Party Products:

  • Databricks account using runtimes >= 13.3
  • Python 3.10, 3.11, or 3.12 (required by Databricks Connect)
  • Docker (required for MATLAB on Databricks and runtimes >= 17)
  • Databricks JDBC or ODBC drivers (required by MATLAB Database Toolbox)

Installation

Installation instructions

MATLAB Desktop

Installing With Toolbox Package

  1. Under "Assets" of a release, download the toolbox package .mltbx file.
  2. Start MATLAB.
  3. In the Current Folder browser, navigate to the .mltbx file.
  4. Right click on the .mltbx file and select "Install".

Installing With MATLAB Command Window

Paste this into the MATLAB Command window:

websave(fullfile(tempdir,"databricks.mltbx"),"https://github.com/mathworks/MATLAB-Interface-for-Databricks/releases/latest/download/matlab-databricks.mltbx");
matlab.addons.install(fullfile(tempdir,"databricks.mltbx"));

MATLAB on Databricks

For full cluster setup instructions, see the MATLAB on Databricks Reference Architecture. Follow the instructions in the Connect to MATLAB notebook to install the package.

Getting Started

  1. In MATLAB, run setup. This will guide you through configuring your Databricks workspace URL, authentication, and connection settings.
  2. Configure authentication — see Authentication for supported methods (PAT, OAuth, etc.).
  3. Try an example: Databricks Connect NYC taxi or JDBC workflow.

For detailed setup instructions, see Setup.

Examples

Example Description
Databricks Connect — NYC Taxi Query and analyze NYC taxi data using Spark from MATLAB
Databricks Connect — Artifacts Work with Databricks artifacts
Machine Learning Train and deploy ML models on Databricks
Simscape™ Simulation Deploy Simscape models to run at Spark scale
Simulink 3DoF Deploy a Simulink suspension model to Databricks
App Designer Build a MATLAB App to browse Databricks clusters
Tasks Run MATLAB batch tasks on Databricks

See all examples in Software/MATLAB/examples/. To learn how to use this in testing workflows, see Examples.

License

The license is available in the LICENSE.md file in this repository.

Community Support

MATLAB Central

About

MATLAB Interface for Databricks - Connect MATLAB to Databricks for data access, Spark computing, and deployment

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages