matlab-choose-big-data-solution

Select the correct MATLAB datastore and tall array pattern for large tabular data.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-choose-big-data-solution
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-choose-big-data-solution
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/matlab-data-import-and-analysis/matlab-choose-big-data-solution
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-choose-big-data-solution

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Working with large CSV, Parquet, Excel, or MDF files in MATLAB often leads to out-of-memory errors when using readtable or parquetread, and choosing between datastores, tall arrays, transforms, and parallel execution is confusing without clear guidance.

Core Features & Use Cases

  • Decision Flowchart: Routes you to exactly one recommended pattern — datastore + tall arrays for continuous datasets, datastore + transform for per-file or per-row-group processing, or parallel execution — based on data size and processing goal.
  • Migration Guidance: Provides property-by-property mappings for migrating OOM-prone readtable and parquetread code to tabularTextDatastore and parquetDatastore, including textscan format specifier workarounds.
  • Custom Datastore Implementation: Covers building custom datastore classes by subclassing matlab.io.Datastore with FileSet or BlockedFileSet, mixin selection (Partitionable, Subsettable, Shuffleable), and testing guidelines.
  • Use Case: You have 50 GB of CSV sensor logs that crash readtable. The skill directs you to tabularTextDatastore plus tall arrays, shows the groupsummary/gather pattern, and explains how to open a parallel pool to speed up computation.

Quick Start

Ask the agent to help process a large CSV file that causes out-of-memory errors with readtable in MATLAB.

Frequently Asked Questions about matlab-choose-big-data-solution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I process large CSV files in MATLAB without running out of memory?

Use tabularTextDatastore combined with tall arrays to process large CSV files in chunks automatically. Create the datastore, wrap it with tall, apply operations like groupsummary, then call gather to collect results into memory.

What is the difference between tall arrays and datastore transform in MATLAB?

Tall arrays treat all files as one continuous dataset for aggregate analysis, while transform processes each file or row group independently. Use tall for whole-dataset statistics and transform when file boundaries matter, such as per-file statistics.

How do I migrate readtable code to tabularTextDatastore?

Replace readtable with tabularTextDatastore and wrap it in tall. Note that TextType must be set at creation time, TrimNonNumeric is unsupported, and type overrides use TextscanFormats specifiers like %q or %f instead of setvartype.

Does parquetDatastore support parallel processing in MATLAB?

Yes, readall on a transformed parquetDatastore supports UseParallel=true when Parallel Computing Toolbox is installed. Tall arrays built on parquetDatastore also distribute computation automatically across an open parallel pool.

When should I build a custom datastore class in MATLAB?

Build a custom datastore by subclassing matlab.io.Datastore when your format lacks a built-in datastore, such as large XML, JSON, or proprietary binary files. First check whether fileDatastore with a custom ReadFcn is sufficient before writing a full class.

Why does readtable run out of memory on large JSON or XML files?

readtable loads the entire file into memory, so large JSON, XML, HTML, or Word files cause OOM errors. Built-in datastores do not support these formats, so the solution is a custom datastore that reads the file in chunks.