[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75MEF48JZWF1CRP20CX69TC":3,"skill-same:01M75MEF48JZWF1CRP20CX69TC":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M75MEF48JZWF1CRP20CX69TC","matlab-choose-bigdata-solution",null,"Guide users or agents to the correct MATLAB tool for processing large tabular data in file-based formats (CSV, Parquet, delimited text, spreadsheets, MDF) that may not fit in memory. Use when a user or agent mentions large files, big data, out-of-memory errors, OOM, scaling up, tall arrays, datastores, or needs to process multiple tabular files. Covers the decision between datastore + tall, datastore + transform, and parallel execution. Also use when a user or agent has working in-memory code (readtable, parquetread) that runs out of memory and needs a migration path. Do NOT use for MAT, XML, JSON, HTML files or Word documents.","stanfish06\u002Fskillquarium","stanfish06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93099613?v=4","01M75F1CK4ZW109ZK3T26VN52F","Zhiyuan","01M75F1CM53VH6F79DZ8GXKKES",12,"BSD-2-Clause","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fmatlab-choose-bigdata-solution\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fmatlab-choose-bigdata-solution\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: matlab-choose-bigdata-solution\ndescription: >\n  Guide users or agents to the correct MATLAB tool for processing large tabular\n  data in file-based formats (CSV, Parquet, delimited text, spreadsheets, MDF)\n  that may not fit in memory. Use when a user or agent mentions large files, big\n  data, out-of-memory errors, OOM, scaling up, tall arrays, datastores, or needs\n  to process multiple tabular files. Covers the decision between datastore +\n  tall, datastore + transform, and parallel execution. Also use when a user or\n  agent has working in-memory code (readtable, parquetread) that runs out of\n  memory and needs a migration path. Do NOT use for MAT, XML, JSON, HTML files\n  or Word documents.\nlicense: MathWorks BSD-3-Clause\nmetadata:\n  author: MathWorks\n  version: \"1.0\"\n---\n\n# Choose Big Data Solution\n\nHelp users and agents select the right MATLAB tool for large **tabular data in\nfile-based formats** (CSV, Parquet, delimited text, spreadsheets, MDF). The\nskill encodes a decision flowchart — recommend one clear path, not a menu of\noptions.\n\n## When to Use\n\n- User or agent has large tabular data in file-based formats (CSV, Parquet, delimited text, spreadsheets, MDF)\n- User or agent says data is \"large\", \"big\", or \"huge\" (even without a specific size)\n- User or agent hits an out-of-memory error with `readtable`, `parquetread`, or similar\n- User or agent has multiple tabular files to process as a single dataset\n- User or agent has multiple tabular files to process independently (per-file)\n- User or agent asks how to scale up an existing workflow on tabular file data\n- User or agent asks about datastores, tall arrays, or mapreduce\n\n## When NOT to Use\n\n- Single file that fits in memory (file-size-to-RAM ratio \u003C 0.5) — see Pre-Flight Check\n- User or agent is working with MAT files — `matfile` provides partial I\u002FO for large `.mat` files, different workflow\n- User or agent is working with databases (SQL, ODBC) — use Database Toolbox. See the `matlab-read-database` and `matlab-use-duckdb` skills in the `reporting-and-database-access` category\n- User or agent needs GPU acceleration — different domain\n- User or agent is building a custom datastore class — see `doc matlab.io.Datastore`\n- User or agent has large XML, JSON, HTML, or Word document files — `readtable` supports these formats but the datastores covered by this skill do not. Scaling these requires a custom datastore (see \"Unsupported Formats\" section below)\n- Deep learning training workflows — datastore is correct for data loading, but use `minibatchqueue` for batching (not tall or transform)\n\n## Pre-Flight Check\n\n**ALWAYS run this check BEFORE recommending datastore or tall array patterns.**\nEstimate the file-size-to-available-RAM ratio (accounting for in-memory\nexpansion of the file format).\n\n| Condition | Route | Rationale |\n|-----------|-------|-----------|\n| Single file, ratio \u003C 0.5 | Native MATLAB I\u002FO (`readtable`, `parquetread`) | Fits in memory; datastore\u002Ftall adds unnecessary complexity |\n| Single file, ratio ≥ 0.5, OR user\u002Fagent reports OOM | Continue to Decision Flowchart below | Data may not fit in memory |\n| Multiple files | Continue to Decision Flowchart below | Datastore patterns provide unified multi-file access |\n| Size unknown and user\u002Fagent describes data as \"large\", \"big\", or \"huge\" | Continue to Decision Flowchart below | Assume large until proven otherwise |\n\n**If the data fits in memory (single file, ratio \u003C 0.5):** recommend native\nI\u002FO and stop. Mention that datastore and tall array patterns exist if the\ndata grows beyond memory in the future, but do not implement them now.\n\n## Decision Flowchart\n\nFollow this flowchart strictly. Present ONE recommended path, not multiple\nalternatives. Only mention alternatives if the situation is ambiguous.\n\n```\nIs the data described as \"large\" or causing OOM?\n│\n├── YES\n│   │\n│   ├── Is the goal to process all data as ONE continuous dataset?\n│   │   │\n│   │   └── YES → Datastore + Tall Arrays\n│   │             Choose datastore by format:\n│   │               CSV\u002Fdelimited text → tabularTextDatastore\n│   │               Parquet            → parquetDatastore\n│   │               Excel (.xlsx\u002F.xls) → spreadsheetDatastore\n│   │               MDF (.mf4\u002F.mdf)    → mdfDatastore (requires Vehicle Network Toolbox)\n│   │\n│   └── Is the goal to process each unit INDEPENDENTLY?\n│       │\n│       ├── One read = one FILE\n│       │     CSV\u002Fdelimited text → tabularTextDatastore\n│       │     Excel (.xlsx\u002F.xls) → spreadsheetDatastore\n│       │\n│       └── One read = one ROW GROUP\n│             Parquet → parquetDatastore\n│\n└── NO \u002F UNCLEAR\n    └── STOP. Ask: (1) what is the file format? (2) do you need to process\n        all data as one dataset, or each file\u002Funit independently?\n        Do NOT show code until these are answered.\n\nOptional (requires Parallel Computing Toolbox):\n├── Speed up tall arrays locally → Open a parallel pool\n├── Speed up readall on transforms → UseParallel\n└── Speed up tall arrays on Hadoop\u002FSpark → mapreducer (also requires MATLAB Parallel Server)\n```\n\n**Critical rules:**\n- **When the processing goal is unclear (continuous vs per-file), STOP and ask\n  before writing any code.** Do not show code examples, do not generate scripts,\n  do not demonstrate both approaches. Ask which applies and wait for the answer.\n  The correct response to ambiguity is a short clarifying question, not a menu\n  of options with code for each.\n- When data is described as \"large\", NEVER lead with `readtable` or `parquetread`\n- For per-file or per-row-group processing, NEVER suggest tall arrays (tall merges all data into one dataset and has no concept of file or row group boundaries)\n- For Parquet, the natural independent unit is the **row group**, not the file — `parquetDatastore` defaults to `ReadSize = \"rowgroup\"`. Do NOT force `ReadSize = \"file\"` on a Parquet datastore unless the workflow truly needs whole-file granularity\n- For parallelism, recommend parallel pool FIRST; mapreducer is only for Hadoop\u002FSpark\n- Do NOT present manual chunking (while\u002Fread loops) as the first option — tall arrays handle chunking automatically\n- Do NOT present multiple options — follow the flowchart and recommend ONE clear path\n\n## Datastore + Tall Arrays (continuous dataset)\n\nUse when: processing one large file OR multiple files as a single dataset.\nUse the datastore matching the format (see Decision Flowchart above).\n\n```matlab\n% Single file\nds = tabularTextDatastore(\"largedata.csv\");\ntt = tall(ds);\n\n% Multiple files\nds = tabularTextDatastore(\"data\u002F*.csv\");\ntt = tall(ds);\n\n% For example, compute statistics with the tall array and gather results.\n% Tall handles chunking automatically\nresult = groupsummary(tt, \"GroupVar\", {\"mean\", \"std\", \"min\", \"max\"});\nresult = gather(result);\n```\n\n**Key points:**\n- Most common functions work on tall: `mean`, `std`, `min`, `max`, `groupsummary`, `sortrows`, `topkrows`\n- Combine multiple gathers: `[a, b] = gather(tallA, tallB)`\n\n**DuckDB alternative (R2026a+):** When the goal is to filter, aggregate,\ndeduplicate, or sample a large file down to a small in-memory result, a\nsingle DuckDB query may be faster than datastore + tall for these\noperations. DuckDB queries CSV\u002FParquet\u002FJSON files directly without loading\nthem. Requires Database Toolbox. See the `matlab-use-duckdb` skill in the\n`reporting-and-database-access` category.\n\n**Migrating from readtable (OOM on large files):**\n\n```matlab\n% Before:\nT = readtable(\"large.csv\");\nstats = groupsummary(T, \"Category\", \"mean\");\n\n% After:\nds = tabularTextDatastore(\"large.csv\");\ntt = tall(ds);\nstats = gather(groupsummary(tt, \"Category\", \"mean\"));\n```\n\n`tabularTextDatastore` uses a stricter textscan-based parser. Key gotchas:\n- `TextType` must be set at **creation time** — read-only after construction\n- `TrimNonNumeric` unsupported — read as `%q`, strip on the tall array\n- `%f` errors on non-numeric content — read as `%q`, convert with `str2double`\n- `ExtraColumnsRule` does not exist — append `\"%*[^\\r\\n]\"` to `TextscanFormats`\n- `detectImportOptions` does not apply — configure via datastore properties directly\n\nSee `references\u002Freadtable-to-datastore-migration.md` for the full property mapping.\n\n**Migrating from parquetread:** Replace with `parquetDatastore` + `tall`. Types\nare preserved exactly — no format specifier issues. All `parquetread` options\nmap 1:1 to datastore properties. See `references\u002Fparquetread-to-datastore-migration.md`.\n\n## Datastore + Transform (per-file)\n\nUse when: each file in a folder should be processed independently (per-file\nstatistics, per-file transformations, file-level aggregation).\n\n```matlab\n% Set up datastore to read one file at a time\nds = tabularTextDatastore(\"data\u002F*.csv\");\nds.ReadSize = \"file\";\n\n% For example, compute statistics by transforming the datastore with a custom function.\ntds = transform(ds, @computeFileStats);\nresults = readall(tds);\n\nfunction out = computeFileStats(data)\n    numVars = vartype(\"numeric\");\n    out = table( ...\n        min(data{:, numVars}, [], 1, \"omitmissing\"), ...\n        max(data{:, numVars}, [], 1, \"omitmissing\"), ...\n        mean(data{:, numVars}, 1, \"omitmissing\"), ...\n        VariableNames=[\"Min\", \"Max\", \"Mean\"]);\nend\n```\n\nFor Excel files, use `spreadsheetDatastore` instead of `tabularTextDatastore`.\n`spreadsheetDatastore` defaults to `ReadSize = \"file\"` so no override is needed.\nFor per-sheet processing (e.g., statistics per worksheet), set `ReadSize = \"sheet\"`\nso each `read` returns exactly one sheet's data.\n\n**Key points:**\n- For `tabularTextDatastore`, set `ReadSize = \"file\"` so each `read` returns\n  exactly one file's data. The default `ReadSize` is a row count, which can\n  split a single file across multiple reads but it will not go across file\n  boundaries\n- `transform` applies a function to each read — the datastore output contains only the\n  transformed results, not the original data. The transform function does not\n  need to return the same number of rows as its input (e.g., computing the mean\n  of each variable produces a single row per read)\n- `readall` on the transformed datastore collects all per-file results\n\n**Do NOT use tall arrays for per-file processing.** Tall arrays treat all files\nas one continuous dataset — they have no concept of file boundaries.\n\n## Datastore + Transform (per-row-group, Parquet)\n\nUse when: a Parquet dataset is partitioned by row group (e.g., one row group\nper item, sensor, region, or time bucket) and each row group must be processed\nindependently. Row groups are the natural unit of independence in Parquet —\ndata from different row groups should not be mixed when the partitioning\nencodes a meaningful grouping.\n\n```matlab\n% parquetDatastore defaults ReadSize to \"rowgroup\" — one read = one row group.\n% Do NOT set ReadSize = \"file\": that would mix row groups within the same file.\npds = parquetDatastore(\"data\u002F\");\n\n% For example, compute statistics by transforming the datastore with a custom function.\ntds = transform(pds, @computeRowGroupStats);\nresults = readall(tds);\n\nfunction out = computeRowGroupStats(data)\n    out = table( ...\n        unique(data.item), ...\n        mean(data.val, \"omitmissing\"), ...\n        std(data.val, \"omitmissing\"), ...\n        VariableNames=[\"Item\", \"Mean\", \"Std\"]);\nend\n```\n\n**Key points:**\n- `parquetDatastore` defaults to `ReadSize = \"rowgroup\"`. Each `read` returns\n  exactly one row group — leave the default\n- A row group is the smallest independently readable unit inside a Parquet file.\n  Writers commonly assign one row group per partition key (item, sensor, day),\n  so per-row-group processing preserves those boundaries\n\n**Do NOT set `ReadSize = \"file\"` on a Parquet datastore for this workflow** —\nit merges all row groups in a file into a single read and silently mixes data\nthat was meant to stay separate. Use file-level granularity only when each file\nalready contains exactly one logical group.\n\n## Parallelizing readall (transform workflows)\n\nThe `readall` call in both per-file and per-row-group transform workflows\nsupports parallel execution when Parallel Computing Toolbox is installed and\nlicensed. Suggest this only when the toolbox is available:\n\n```matlab\nresults = readall(tds, UseParallel=true);\n```\n\n- `UseParallel=true` parallelizes reads across workers in an open parallel\n  pool. If no pool is open, MATLAB opens one automatically\n- Only suggest `UseParallel` if Parallel Computing Toolbox is available\n\n## Parallel Pool (local parallelism for tall arrays)\n\nUse when: the goal is to speed up a tall array workflow with local cores.\nOnly recommend if Parallel Computing Toolbox is installed and licensed.\n\n```matlab\n% Start a thread or process pool\nparpool(\"Threads\");\n% parpool(\"Processes\");\n\nds = tabularTextDatastore(\"data\u002F*.csv\");\ntt = tall(ds);\nresult = gather(mean(tt, \"omitmissing\"));\n```\n\nTall array computations automatically distribute across available workers when\na parallel pool is open. No code changes needed beyond opening the pool.\n\nDo NOT suggest `parpool` or parallel pool workflows unless Parallel Computing\nToolbox is available — `parpool` errors without it.\n\n## Mapreducer (Hadoop\u002FSpark only)\n\nUse ONLY when the user or agent explicitly has a Hadoop or Spark environment.\nRequires both Parallel Computing Toolbox and MATLAB Parallel Server.\n\n```matlab\nmr = mapreducer(cluster);\nds = tabularTextDatastore(\"hdfs:\u002F\u002F\u002Fdata\u002F*.csv\");\ntt = tall(ds);\nresult = gather(mean(tt, \"omitmissing\"));\n```\n\n**Do NOT recommend mapreducer for local parallel processing** — a parallel pool\nis simpler and sufficient for local multi-core execution.\n\nDo NOT suggest `mapreducer` for Hadoop\u002FSpark execution unless the user or agent\nhas Parallel Computing Toolbox and a Hadoop or Spark environment with MATLAB\nParallel Server installed and licensed.\n\n## Key Functions\n\n| Function | Purpose | When to Use |\n|----------|---------|-------------|\n| `tabularTextDatastore` | Chunked access to CSV\u002Ftext files | Large CSV\u002Ftext files |\n| `parquetDatastore` | Chunked access to Parquet files | Large Parquet files |\n| `spreadsheetDatastore` | Chunked access to Excel files | Large .xlsx\u002F.xls files |\n| `mdfDatastore` | Chunked access to MDF files | Large .mf4\u002F.mdf files (requires Vehicle Network Toolbox) |\n| `tall` | Lazy evaluation over a datastore | Continuous dataset processing |\n| `gather` | Execute deferred tall computations | Collect results into memory |\n| `transform` | Apply function to each datastore read | Per-file (text) or per-row-group (Parquet) processing |\n| `groupsummary` | Grouped statistics (tall-compatible) | Aggregation by category |\n| `parpool` | Open parallel worker pool | Speed up tall computations |\n| `mapreducer` | Connect to Hadoop\u002FSpark cluster | Hadoop\u002FSpark environments only |\n\n## Unsupported Formats (JSON, XML, HTML, Word)\n\nThe datastores covered by this skill (`tabularTextDatastore`, `parquetDatastore`,\n`spreadsheetDatastore`, `mdfDatastore`) do NOT support JSON, XML, HTML, or Word\ndocuments. If the user or agent has an OOM error with `readtable` on one of these formats,\ndo NOT recommend converting to Parquet\u002FCSV first — `readtable` itself would OOM\nduring the conversion, creating a circular dependency.\n\n**Why not `fileDatastore` with `readtable`?** A common instinct is to use\n`fileDatastore(@readtable)` — but if `readtable` OOMs on the file, wrapping it\nin `fileDatastore` does not help because the read function still loads the\nentire file into memory.\n\nInstead, recommend building a **custom datastore** with a chunked read function\nthat processes the file in manageable pieces without loading it entirely into\nmemory (e.g., reading N lines of XML at a time, or parsing JSON arrays\nincrementally). A `fileDatastore` with such a chunked read function is one\noption; implementing the full `matlab.io.Datastore` interface is another. Point\nthe user to `doc matlab.io.Datastore` for the interface specification.\n\nA custom datastore can then be used with `tall` or `transform` just like the\nbuilt-in datastores.\n\n----\n\nCopyright 2026 The MathWorks, Inc.\n\n----\n","# Choose Big Data Solution\n\nHelp users and agents select the right MATLAB tool for large **tabular data in\nfile-based formats** (CSV, Parquet, delimited text, spreadsheets, MDF). The\nskill encodes a decision flowchart — recommend one clear path, not a menu of\noptions.\n\n## When to Use\n\n- User or agent has large tabular data in file-based formats (CSV, Parquet, delimited text, spreadsheets, MDF)\n- User or agent says data is \"large\", \"big\", or \"huge\" (even without a specific size)\n- User or agent hits an out-of-memory error with `readtable`, `parquetread`, or similar\n- User or agent has multiple tabular files to process as a single dataset\n- User or agent has multiple tabular files to process independently (per-file)\n- User or agent asks how to scale up an existing workflow on tabular file data\n- User or agent asks about datastores, tall arrays, or mapreduce\n\n## When NOT to Use\n\n- Single file that fits in memory (file-size-to-RAM ratio \u003C 0.5) — see Pre-Flight Check\n- User or agent is working with MAT files — `matfile` provides partial I\u002FO for large `.mat` files, different workflow\n- User or agent is working with databases (SQL, ODBC) — use Database Toolbox. See the `matlab-read-database` and `matlab-use-duckdb` skills in the `reporting-and-database-access` category\n- User or agent needs GPU acceleration — different domain\n- User or agent is building a custom datastore class — see `doc matlab.io.Datastore`\n- User or agent has large XML, JSON, HTML, or Word document files — `readtable` supports these formats but the datastores covered by this skill do not. Scaling these requires a custom datastore (see \"Unsupported Formats\" section below)\n- Deep learning training workflows — datastore is correct for data loading, but use `minibatchqueue` for batching (not tall or transform)\n\n## Pre-Flight Check\n\n**ALWAYS run this check BEFORE recommending datastore or tall array patterns.**\nEstimate the file-size-to-available-RAM ratio (accounting for in-memory\nexpansion of the file format).\n\n| Condition | Route | Rationale |\n|-----------|-------|-----------|\n| Single file, ratio \u003C 0.5 | Native MATLAB I\u002FO (`readtable`, `parquetread`) | Fits in memory; datastore\u002Ftall adds unnecessary complexity |\n| Single file, ratio ≥ 0.5, OR user\u002Fagent reports OOM | Continue to Decision Flowchart below | Data may not fit in memory |\n| Multiple files | Continue to Decision Flowchart below | Datastore patterns provide unified multi-file access |\n| Size unknown and user\u002Fagent describes data as \"large\", \"big\", or \"huge\" | Continue to Decision Flowchart below | Assume large until proven otherwise |\n\n**If the data fits in memory (single file, ratio \u003C 0.5):** recommend native\nI\u002FO and stop. Mention that datastore and tall array patterns exist if the\ndata grows beyond memory in the future, but do not implement them now.\n\n## Decision Flowchart\n\nFollow this flowchart strictly. Present ONE recommended path, not multiple\nalternatives. Only mention alternatives if the situation is ambiguous.\n\n```\nIs the data described as \"large\" or causing OOM?\n│\n├── YES\n│   │\n│   ├── Is the goal to process all data as ONE continuous dataset?\n│   │   │\n│   │   └── YES → Datastore + Tall Arrays\n│   │             Choose datastore by format:\n│   │               CSV\u002Fdelimited text → tabularTextDatastore\n│   │               Parquet            → parquetDatastore\n│   │               Excel (.xlsx\u002F.xls) → spreadsheetDatastore\n│   │               MDF (.mf4\u002F.mdf)    → mdfDatastore (requires Vehicle Network Toolbox)\n│   │\n│   └── Is the goal to process each unit INDEPENDENTLY?\n│       │\n│       ├── One read = one FILE\n│       │     CSV\u002Fdelimited text → tabularTextDatastore\n│       │     Excel (.xlsx\u002F.xls) → spreadsheetDatastore\n│       │\n│       └── One read = one ROW GROUP\n│             Parquet → parquetDatastore\n│\n└── NO \u002F UNCLEAR\n    └── STOP. Ask: (1) what is the file format? (2) do you need to process\n        all data as one dataset, or each file\u002Funit independently?\n        Do NOT show code until these are answered.\n\nOptional (requires Parallel Computing Toolbox):\n├── Speed up tall arrays locally → Open a parallel pool\n├── Speed up readall on transforms → UseParallel\n└── Speed up tall arrays on Hadoop\u002FSpark → mapreducer (also requires MATLAB Parallel Server)\n```\n\n**Critical rules:**\n- **When the processing goal is unclear (continuous vs per-file), STOP and ask\n  before writing any code.** Do not show code examples, do not generate scripts,\n  do not demonstrate both approaches. Ask which applies and wait for the answer.\n  The correct response to ambiguity is a short clarifying question, not a menu\n  of options with code for each.\n- When data is described as \"large\", NEVER lead with `readtable` or `parquetread`\n- For per-file or per-row-group processing, NEVER suggest tall arrays (tall merges all data into one dataset and has no concept of file or row group boundaries)\n- For Parquet, the natural independent unit is the **row group**, not the file — `parquetDatastore` defaults to `ReadSize = \"rowgroup\"`. Do NOT force `ReadSize = \"file\"` on a Parquet datastore unless the workflow truly needs whole-file granularity\n- For parallelism, recommend parallel pool FIRST; mapreducer is only for Hadoop\u002FSpark\n- Do NOT present manual chunking (while\u002Fread loops) as the first option — tall arrays handle chunking automatically\n- Do NOT present multiple options — follow the flowchart and recommend ONE clear path\n\n## Datastore + Tall Arrays (continuous dataset)\n\nUse when: processing one large file OR multiple files as a single dataset.\nUse the datastore matching the format (see Decision Flowchart above).\n\n```matlab\n% Single file\nds = tabularTextDatastore(\"largedata.csv\");\ntt = tall(ds);\n\n% Multiple files\nds = tabularTextDatastore(\"data\u002F*.csv\");\ntt = tall(ds);\n\n% For example, compute statistics with the tall array and gather results.\n% Tall handles chunking automatically\nresult = groupsummary(tt, \"GroupVar\", {\"mean\", \"std\", \"min\", \"max\"});\nresult = gather(result);\n```\n\n**Key points:**\n- Most common functions work on tall: `mean`, `std`, `min`, `max`, `groupsummary`, `sortrows`, `topkrows`\n- Combine multiple gathers: `[a, b] = gather(tallA, tallB)`\n\n**DuckDB alternative (R2026a+):** When the goal is to filter, aggregate,\ndeduplicate, or sample a large file down to a small in-memory result, a\nsingle DuckDB query may be faster than datastore + tall for these\noperations. DuckDB queries CSV\u002FParquet\u002FJSON files directly without loading\nthem. Requires Database Toolbox. See the `matlab-use-duckdb` skill in the\n`reporting-and-database-access` category.\n\n**Migrating from readtable (OOM on large files):**\n\n```matlab\n% Before:\nT = readtable(\"large.csv\");\nstats = groupsummary(T, \"Category\", \"mean\");\n\n% After:\nds = tabularTextDatastore(\"large.csv\");\ntt = tall(ds);\nstats = gather(groupsummary(tt, \"Category\", \"mean\"));\n```\n\n`tabularTextDatastore` uses a stricter textscan-based parser. Key gotchas:\n- `TextType` must be set at **creation time** — read-only after construction\n- `TrimNonNumeric` unsupported — read as `%q`, strip on the tall array\n- `%f` errors on non-numeric content — read as `%q`, convert with `str2double`\n- `ExtraColumnsRule` does not exist — append `\"%*[^\\r\\n]\"` to `TextscanFormats`\n- `detectImportOptions` does not apply — configure via datastore properties directly\n\nSee `references\u002Freadtable-to-datastore-migration.md` for the full property mapping.\n\n**Migrating from parquetread:** Replace with `parquetDatastore` + `tall`. Types\nare preserved exactly — no format specifier issues. All `parquetread` options\nmap 1:1 to datastore properties. See `references\u002Fparquetread-to-datastore-migration.md`.\n\n## Datastore + Transform (per-file)\n\nUse when: each file in a folder should be processed independently (per-file\nstatistics, per-file transformations, file-level aggregation).\n\n```matlab\n% Set up datastore to read one file at a time\nds = tabularTextDatastore(\"data\u002F*.csv\");\nds.ReadSize = \"file\";\n\n% For example, compute statistics by transforming the datastore with a custom function.\ntds = transform(ds, @computeFileStats);\nresults = readall(tds);\n\nfunction out = computeFileStats(data)\n    numVars = vartype(\"numeric\");\n    out = table( ...\n        min(data{:, numVars}, [], 1, \"omitmissing\"), ...\n        max(data{:, numVars}, [], 1, \"omitmissing\"), ...\n        mean(data{:, numVars}, 1, \"omitmissing\"), ...\n        VariableNames=[\"Min\", \"Max\", \"Mean\"]);\nend\n```\n\nFor Excel files, use `spreadsheetDatastore` instead of `tabularTextDatastore`.\n`spreadsheetDatastore` defaults to `ReadSize = \"file\"` so no override is needed.\nFor per-sheet processing (e.g., statistics per worksheet), set `ReadSize = \"sheet\"`\nso each `read` returns exactly one sheet's data.\n\n**Key points:**\n- For `tabularTextDatastore`, set `ReadSize = \"file\"` so each `read` returns\n  exactly one file's data. The default `ReadSize` is a row count, which can\n  split a single file across multiple reads but it will not go across file\n  boundaries\n- `transform` applies a function to each read — the datastore output contains only the\n  transformed results, not the original data. The transform function does not\n  need to return the same number of rows as its input (e.g., computing the mean\n  of each variable produces a single row per read)\n- `readall` on the transformed datastore collects all per-file results\n\n**Do NOT use tall arrays for per-file processing.** Tall arrays treat all files\nas one continuous dataset — they have no concept of file boundaries.\n\n## Datastore + Transform (per-row-group, Parquet)\n\nUse when: a Parquet dataset is partitioned by row group (e.g., one row group\nper item, sensor, region, or time bucket) and each row group must be processed\nindependently. Row groups are the natural unit of independence in Parquet —\ndata from different row groups should not be mixed when the partitioning\nencodes a meaningful grouping.\n\n```matlab\n% parquetDatastore defaults ReadSize to \"rowgroup\" — one read = one row group.\n% Do NOT set ReadSize = \"file\": that would mix row groups within the same file.\npds = parquetDatastore(\"data\u002F\");\n\n% For example, compute statistics by transforming the datastore with a custom function.\ntds = transform(pds, @computeRowGroupStats);\nresults = readall(tds);\n\nfunction out = computeRowGroupStats(data)\n    out = table( ...\n        unique(data.item), ...\n        mean(data.val, \"omitmissing\"), ...\n        std(data.val, \"omitmissing\"), ...\n        VariableNames=[\"Item\", \"Mean\", \"Std\"]);\nend\n```\n\n**Key points:**\n- `parquetDatastore` defaults to `ReadSize = \"rowgroup\"`. Each `read` returns\n  exactly one row group — leave the default\n- A row group is the smallest independently readable unit inside a Parquet file.\n  Writers commonly assign one row group per partition key (item, sensor, day),\n  so per-row-group processing preserves those boundaries\n\n**Do NOT set `ReadSize = \"file\"` on a Parquet datastore for this workflow** —\nit merges all row groups in a file into a single read and silently mixes data\nthat was meant to stay separate. Use file-level granularity only when each file\nalready contains exactly one logical group.\n\n## Parallelizing readall (transform workflows)\n\nThe `readall` call in both per-file and per-row-group transform workflows\nsupports parallel execution when Parallel Computing Toolbox is installed and\nlicensed. Suggest this only when the toolbox is available:\n\n```matlab\nresults = readall(tds, UseParallel=true);\n```\n\n- `UseParallel=true` parallelizes reads across workers in an open parallel\n  pool. If no pool is open, MATLAB opens one automatically\n- Only suggest `UseParallel` if Parallel Computing Toolbox is available\n\n## Parallel Pool (local parallelism for tall arrays)\n\nUse when: the goal is to speed up a tall array workflow with local cores.\nOnly recommend if Parallel Computing Toolbox is installed and licensed.\n\n```matlab\n% Start a thread or process pool\nparpool(\"Threads\");\n% parpool(\"Processes\");\n\nds = tabularTextDatastore(\"data\u002F*.csv\");\ntt = tall(ds);\nresult = gather(mean(tt, \"omitmissing\"));\n```\n\nTall array computations automatically distribute across available workers when\na parallel pool is open. No code changes needed beyond opening the pool.\n\nDo NOT suggest `parpool` or parallel pool workflows unless Parallel Computing\nToolbox is available — `parpool` errors without it.\n\n## Mapreducer (Hadoop\u002FSpark only)\n\nUse ONLY when the user or agent explicitly has a Hadoop or Spark environment.\nRequires both Parallel Computing Toolbox and MATLAB Parallel Server.\n\n```matlab\nmr = mapreducer(cluster);\nds = tabularTextDatastore(\"hdfs:\u002F\u002F\u002Fdata\u002F*.csv\");\ntt = tall(ds);\nresult = gather(mean(tt, \"omitmissing\"));\n```\n\n**Do NOT recommend mapreducer for local parallel processing** — a parallel pool\nis simpler and sufficient for local multi-core execution.\n\nDo NOT suggest `mapreducer` for Hadoop\u002FSpark execution unless the user or agent\nhas Parallel Computing Toolbox and a Hadoop or Spark environment with MATLAB\nParallel Server installed and licensed.\n\n## Key Functions\n\n| Function | Purpose | When to Use |\n|----------|---------|-------------|\n| `tabularTextDatastore` | Chunked access to CSV\u002Ftext files | Large CSV\u002Ftext files |\n| `parquetDatastore` | Chunked access to Parquet files | Large Parquet files |\n| `spreadsheetDatastore` | Chunked access to Excel files | Large .xlsx\u002F.xls files |\n| `mdfDatastore` | Chunked access to MDF files | Large .mf4\u002F.mdf files (requires Vehicle Network Toolbox) |\n| `tall` | Lazy evaluation over a datastore | Continuous dataset processing |\n| `gather` | Execute deferred tall computations | Collect results into memory |\n| `transform` | Apply function to each datastore read | Per-file (text) or per-row-group (Parquet) processing |\n| `groupsummary` | Grouped statistics (tall-compatible) | Aggregation by category |\n| `parpool` | Open parallel worker pool | Speed up tall computations |\n| `mapreducer` | Connect to Hadoop\u002FSpark cluster | Hadoop\u002FSpark environments only |\n\n## Unsupported Formats (JSON, XML, HTML, Word)\n\nThe datastores covered by this skill (`tabularTextDatastore`, `parquetDatastore`,\n`spreadsheetDatastore`, `mdfDatastore`) do NOT support JSON, XML, HTML, or Word\ndocuments. If the user or agent has an OOM error with `readtable` on one of these formats,\ndo NOT recommend converting to Parquet\u002FCSV first — `readtable` itself would OOM\nduring the conversion, creating a circular dependency.\n\n**Why not `fileDatastore` with `readtable`?** A common instinct is to use\n`fileDatastore(@readtable)` — but if `readtable` OOMs on the file, wrapping it\nin `fileDatastore` does not help because the read function still loads the\nentire file into memory.\n\nInstead, recommend building a **custom datastore** with a chunked read function\nthat processes the file in manageable pieces without loading it entirely into\nmemory (e.g., reading N lines of XML at a time, or parsing JSON arrays\nincrementally). A `fileDatastore` with such a chunked read function is one\noption; implementing the full `matlab.io.Datastore` interface is another. Point\nthe user to `doc matlab.io.Datastore` for the interface specification.\n\nA custom datastore can then be used with `tall` or `transform` just like the\nbuilt-in datastores.\n\n----\n\nCopyright 2026 The MathWorks, Inc.\n\n----\n",{"name":5,"license":25,"metadata":26,"description":29},"MathWorks BSD-3-Clause",{"author":27,"version":28},"MathWorks","1.0","Guide users or agents to the correct MATLAB tool for processing large tabular data in file-based formats (CSV, Parquet, delimited text, spreadsheets, MDF) that may not fit in memory. Use when a user or agent mentions large files, big data, out-of-memory errors, OOM, scaling up, tall arrays, datastores, or needs to process multiple tabular files. Covers the decision between datastore + tall, datastore + transform, and parallel execution. Also use when a user or agent has working in-memory code (readtable, parquetread) that runs out of memory and needs a migration path. Do NOT use for MAT, XML, JSON, HTML files or Word documents.\n","master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Fmatlab-choose-bigdata-solution",5,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium","https:\u002F\u002Fgithub.com\u002Fstanfish06","https:\u002F\u002Fwww.stanfish.dev\u002F","2026-11-14 21:31:37",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add stanfish06\u002Fskillquarium --skill matlab-choose-bigdata-solution",{"tool":44,"command":45},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill matlab-choose-bigdata-solution",{"tool":47,"command":48},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill matlab-choose-bigdata-solution","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fmatlab-choose-bigdata-solution\u002FSKILL.md",true,[52,57,63,67],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":16},"LICENSE.md","LICENSE","许可证",1482,{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"manifest.yaml","REFERENCE","参考文档",480,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fmatlab-choose-bigdata-solution\u002Fmanifest.yaml",{"path":64,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fparquetread-to-datastore-migration.md",2211,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fmatlab-choose-bigdata-solution\u002Freferences\u002Fparquetread-to-datastore-migration.md",{"path":68,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Freadtable-to-datastore-migration.md",3774,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fmatlab-choose-bigdata-solution\u002Freferences\u002Freadtable-to-datastore-migration.md",[72,80,89,96,103,110],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":76,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":20},"01M76ZJTRVA456GD7K8Y3EP82H","zarr-python","Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3\u002FGCS storage, and NumPy\u002FDask\u002FXarray integration. Use for array layout, bounded I\u002FO, format migration, or scientific metadata preservation.","MIT","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":85,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":20},"01M76ZJQZ15Q1HKC5V85NHE325","yeet","Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":20},"01M76ZJ8ASZ4QYQ70Y6SBA4Z4S","xarray","N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF\u002FGRIB\u002FZarr files, climate\u002Fweather\u002Foceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fxarray\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":76,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":20},"01M76ZHFBXD6VXPQ02VCEG202B","writing-mstest-tests","Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":76,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":20},"01M76ZDFDF4N88RH6HSYGS7GP2","wgs-prs","End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core\u002Fsarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti\u002FTv and Het\u002FHom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwgs-prs\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":114,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":20},"01M76ZCC1SC68J42QK4MDC8RCG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[]]