Use DuckDB from MATLAB via Database Toolbox (R2026a+) as a non-math operations engine on large tabular files (CSV/Parquet/JSON) and as a zero-config embedded database.
SkillScore100Maintained
Automatic
◆Data Engineer pack
Last verified 8/16/2026
What it changes
Passed 21 of 21 test cases with the skill, and 9 of 21 without it.
Without skill41%
With skill100%
Checks it passed that the model alone missed
Connects using duckdb().
Uses sqlread with a RowFilter argument.
Installs and loads the excel extension.
and 16 more in the full report
13 fixed9 passed either way0 still failing0 broke
Pass-rate lift
+59 pp
Tokens
+107%
Agent turns
0%
Response time
-60%
Model gemini-3.6-flashMeasured 8/16/2026v122 of 22 cases passed with skill · 21 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 12
Prompt
I need to query an Excel spreadsheet `quarterly_finances.xlsx` directly using SQL in MATLAB R2026a Database Toolbox without converting it to CSV or using `readtable`. What extension commands and SQL function should I call?
What was checked, without and with the skill
Checked
Without skill
With skill
Installs and loads the excel extension.
Missed
Passed
Queries Excel file using read_xlsx in fetch.
Missed
Passed
case-13 · 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.md310 linessingle file
MATLAB Database Toolbox Interface to DuckDB
Use when working with DuckDB databases from MATLAB using Database Toolbox. DuckDB is an embedded analytical database engine that ships with Database Toolbox starting in R2026a. It enables SQL-based analytics on files, out-of-memory data preprocessing, and portable development databases — all without external database server configuration.
When to Use This Skill
Connecting to a DuckDB database (in-memory or file-based)
Creating a new DuckDB database file for development workflows
Querying CSV, Parquet, or JSON files directly with SQL
Reducing or profiling large data before analysis
Using DuckDB as a non-math operations engine (filter, aggregate, deduplicate, string cleanup, type cast, sort, sample)
Installing and using DuckDB extensions
Persisting file data into a .duckdb file for repeated queries
User mentions keywords: DuckDB, duckdb(), analytical engine, embedded database, large CSV, large Parquet/JSON, file too large for readtable, filter/aggregate at source, deduplicate, reduce before analysis, profile large file, persistent file import, SQL on CSV, SQL on Parquet, SQL on JSON, query CSV with SQL, query Parquet with SQL, run SQL on files, SQL queries on files, query files directly, SQL without database, in-process SQL
When NOT to Use
Single file that fits in memory — use native MATLAB I/O (readtable/readmatrix)
Multi-file workflows — use datastore/tall first; DuckDB glob is the fallback, not the default
Data exceeds memory and no SQL reduction will make it fit — use datastore/tall for streaming
Math-heavy or numerically sensitive operations (normalize, windowed stats, outlier detection) — hand off to MATLAB after reduction
Connecting to MySQL, PostgreSQL, SQLite, or other external databases — use their native interfaces or JDBC/ODBC
Object-relational mapping — use ORM (ormread/ormwrite with Mappable classes)
MongoDB, Cassandra, or Neo4j — use their dedicated Database Toolbox interfaces
On-Load Protocol
When this skill is loaded into a session where code already exists:
Audit the data pipeline — Identify how data enters the workflow:
Is data read via MATLAB I/O (readtable, readmatrix, readcell, readtimetable, parquetread, xlsread, csvread)?
Is data then written to DuckDB with sqlwrite before querying?
If yes: this is the load-then-query anti-pattern. DuckDB can likely read the source file directly via read_csv, read_parquet, or read_xlsx (excel extension).
Evaluate each data source against the decision framework:
Can DuckDB read this file type directly? (CSV, Parquet, JSON, Excel via extension)
Can filtering/aggregation be pushed into the SQL read?
Is the MATLAB I/O step a performance bottleneck?
Recommend architectural changes — Do not limit review to API correctness. Propose replacing readtable/xlsread + sqlwrite + query chains with fetch(conn, "SELECT ... FROM read_csv/read_parquet/read_xlsx(...)").
Use when writing MATLAB functions with arguments blocks — repeating arguments (arguments (Repeating)), .?ClassName property import in constructors, name-value forwarding with namedargs2cell, or migrating from inputParser or validateattributes. Also when reviewing signatures for implicit-conversion pitfalls (size reshaping, class coercion, computed defaults), or when restricting, constraining, or validating function inputs — scalar vs vector enforcement, type rejection, size checking. Also when a