Connects MATLAB to Databricks using JDBC drivers via Database Toolbox.
SkillScore100Maintained
Automatic
◆Data Engineer pack
Last verified 8/16/2026
What it changes
Passed 22 of 22 test cases with the skill, and 7 of 22 without it.
Without skill30%
With skill100%
Checks it passed that the model alone missed
Executes sqlwrite using j.Connection
Passes authMethod='PAT' to databricks.JDBCConnection
Passes cluster=myCluster to databricks.JDBCConnection
and 18 more in the full report
16 fixed7 passed either way0 still failing0 broke
Pass-rate lift
+70 pp
Tokens
+130%
Agent turns
0%
Response time
-65%
Model gemini-3.6-flashMeasured 8/16/2026v123 of 23 cases passed with skill · 22 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 15 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 15
Prompt
Which method on `databricks.JDBCConnection` saves the current connection settings as a Database Toolbox data source for interactive exploration?
What was checked, without and with the skill
Checked
Without skill
With skill
Calls saveSource method on the JDBC connection instance
Missed
Passed
case-19 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md334 lines4 files
Connect MATLAB to Databricks via JDBC
Use when establishing a JDBC connection from MATLAB to Databricks using Database Toolbox and the MATLAB Interface for Databricks package. This skill covers connection class selection, authentication configuration, driver setup, and connection optimization. Once connected, use standard Database Toolbox functions (sqlread, fetch, sqlwrite, execute) on the j.Connection object for data operations.
Connecting via ODBC (use databricks.ODBCConnection directly)
Using Databricks Connect (Python-based Spark API, not Database Toolbox)
Using the Databricks REST APIs (Clusters, Jobs, DBFS, etc.)
Using MLflow from MATLAB (separate module in the package)
Executing SQL via the Statement Execution REST API (not JDBC)
Critical Rules
Connection
ALWAYS prefer databricks.JDBCConnection or StandaloneJDBCConnection over manually constructing a JDBC URL with database(). Manual URL construction is not wrong, but the URL format is complex and error-prone, and may expose connection details in source code. The connection classes handle URL construction, driver classpath, and authentication automatically.
ALWAYS use StandaloneJDBCConnection when the user does not have the MATLAB Interface for Databricks package installed. Never fall back to manual database() with JDBC URL construction.
ALWAYS call close(j) or close(j.Connection) when the connection is no longer needed.
ALWAYS verify a connection succeeded by checking that j.Connection.Message is empty. A non-empty message indicates a driver error.
Authentication
ALWAYS let the connection class handle authentication via the unified provider chain. The default method is OauthU2M. Do not hardcode tokens in source code.
NEVER use the JDBC driver's built-in OauthU2M when running MATLAB on Databricks in a browser. The driver attempts to open a browser window, which fails. Use useDriverAuth=false instead.
Discover OPC UA servers and create client connections in MATLAB using opcuaserverinfo, opcua, connect, setSecurityModel, and certificate trust functions. Use when discovering OPC UA servers on the network, connecting to OPC UA servers, authenticating with username/password or certificates, configuring security modes, handling certificate trust errors, fixing hostname mismatch warnings, troubleshooting connection failures or empty discovery results, or inspecting an OPC UA certificate (.der or .p