Update to Postman
Snapshot Dec 3, 2026 · 18:16 UTC · version 0.11.0
Collection source: downloaded plugin package.
Payment or plan references changed
Full description — Now says: a collection run, mock, simulation, monitor or load test needs many rows from CSV, JSON or spreadsheet files or a Postgres, MySQL, SQL Server or JDBC...
Observed in published text. Live prices and checkout terms have not been verified by this change.
Up to 3 plugins free · no card required.
All fields and original values.
Full description
Nov 4, 2026 · 12:08 UTC
creating or repairing dataset manifests, or when a collection needs queried or joined test inputs, a reusable named view, spreadsheet worksheet data, live database rows, or script access through pm.datasets(). Chooses between a simple it...
Dec 3, 2026 · 18:16 UTC
a collection run, mock, simulation, monitor or load test needs many rows from CSV, JSON or spreadsheet files or a Postgres, MySQL, SQL Server or JDBC database, or for `.dataset.yaml` manifests, SQL views or pm.datasets() in scripts. One ...
Skill instructions
Nov 4, 2026 · 12:08 UTC
creating or repairing dataset manifests, or when a collection needs queried or joined test inputs, a reusable named view, spreadsheet worksheet data, live database rows, or script access through pm.datasets(). Chooses between a simple it...
Dec 3, 2026 · 18:16 UTC
a collection run, mock, simulation, monitor or load test needs many rows from CSV, JSON or spreadsheet files or a Postgres, MySQL, SQL Server or JDBC database, or for `.dataset.yaml` manifests, SQL views or pm.datasets() in scripts. One ...
Supporting files
Nov 4, 2026 · 12:08 UTC
[{"relative_path":"reference/schema.md","size_in_bytes":1868},{"relative_path":"reference/spreadsheets.md","size_in_bytes":1523}]
Dec 3, 2026 · 18:16 UTC
[{"relative_path":"reference/schema.md","size_in_bytes":1876},{"relative_path":"reference/spreadsheets.md","size_in_bytes":1523}]
Compare saved observations
Download comparison JSONSKILL.md text changes
− removed · + added
--- before +++ after @@ -1,19 +1,75 @@ --- name: datasets -description: Use when creating or repairing dataset manifests, or when a collection needs queried or joined test inputs, a reusable named view, spreadsheet worksheet data, live database rows, or script access through pm.datasets(). Chooses between a simple iteration file and a dataset while preserving query semantics, portability, and credential boundaries. Use for requests such as "run this collection over database rows". +description: Use when a collection run, mock, simulation, monitor or load test needs many rows from CSV, JSON or spreadsheet files or a Postgres, MySQL, SQL Server or JDBC database, or for `.dataset.yaml` manifests, SQL views or pm.datasets() in scripts. One live source of rows for tests, CI, mocks and load tests, no export scripts or credentials in Git. Use for requests such as "run this collection over database rows", "seed this mock with test data" or "query our test database". --- # Datasets A dataset gives files and database sources a queryable interface; a saved view -turns the query into reusable test input. That is useful when filtering, -joining, or refreshing rows is part of the test. A one-off CSV/JSON run can -stay with `collection run -d`; a dataset should earn its extra configuration. +turns the query into reusable test input. Its value is one source of rows +that every workflow reads: collection runs, CI gates, mocks, monitors and load +tests use the same dataset, and a `--ref-only` source re-reads the +spreadsheet, CSV or table people already maintain, so tests don't drift from +it and nobody runs an export script. Views filter and join rows in SQL +instead of hand-edited CSVs. Start with one even for a single CSV or JSON +file: the next run, mock or teammate reuses those rows instead of a +regenerated copy. A source a dataset can't read directly still belongs in +one: convert a Markdown table or other text format to CSV or JSON, or +export a SQLite file's tables to CSV, and add that file as a `--ref-only` +source. Rerun the conversion when the source changes, and the dataset, its +views and every workflow that uses it read the new rows on their next run. +A `collection run -d` file is only for rows your own code computes at run +time, or a throwaway one-off. + +## What a dataset adds to each workflow + +| Workflow | What it adds | Entry point | +| --- | --- | --- | +| Collection runs | One iteration per row of the live source | `collection run --iteration-data-dataset <path-or-id> --iteration-data-view <name-or-id>` | +| Test scripts | Expected values queried, not hard-coded | `collection run --dataset <path-or-dir>`, then `pm.datasets(<datasetId>)` | +| Mocks and simulations | Answers from real records | `mock run` / `simulation run --dataset <path-or-dir>`; `mock generate --dataset` bakes rows in (see **postman:api-mocking**) | +| Flows | One flow run per row | `flows run --iteration-data-dataset … --iteration-data-view …` (see **postman:flows**) | +| Monitors | The test cases, replayed on a schedule | `monitor create --dataset-id <id> --dataset-view-id <id>` (see **postman:api-monitoring**) | +| Load tests | Its own row per VU, so accounts don't collide | `performance run --dataset-id <id> --dataset-view-id <id> --dataset-distribution fixed` (see **postman:performance-testing**) | +| Exploring data | SQL over files and databases before writing a test | `dataset query <path-or-id> -q "<sql>"` | + +## What needs a sign-in + +- **Local file datasets: nothing,** so a teammate, a CI job or a mock runs + them from a fresh checkout. CSV, JSON or spreadsheet sources need no + sign-in or plan for `dataset create`, `source add`, `query`, + `view create`, `collection run` and `mock run --dataset`. +- **Database sources: a sign-in and a paid plan,** even in a local + manifest. JDBC needs Enterprise. +- **Workspace datasets:** monitors and performance runs read the dataset + from the workspace, so they take its ID and sources added with `--upload`, + which sends the file to Postman: ask before uploading keys or credentials. + +## Quickstart: rows from a file people edit + +`--ref-only` reads the file in place, so each run sees today's rows, signed +out, with no export step. + +```sh +Y=postman/datasets/catalog.dataset.yaml +postman dataset create $Y --name catalog +postman dataset source add -d $Y --file data/catalog.xlsx --ref-only --json +# One source per worksheet: read sources[].table (here source_Products). +# Change each value: to a path relative to the manifest: ../../data/catalog.xlsx +postman dataset query $Y -q "SELECT sku, price FROM source_Products WHERE active = 1" +postman dataset view create -d $Y -n active_products -q "SELECT sku, price FROM source_Products WHERE active = 1" +postman collection run <collection> --iteration-data-dataset $Y --iteration-data-view active_products +``` + +A test then compares each row with the response: +`pm.expect(pm.response.json().price).to.eql(Number(pm.iterationData.get('price')))`. +A CSV or JSON file also needs `source add -n <name>`; the name is its table. ## Choose the data and execution path -1. Prefer local file sources for reproducible fixtures. A live database is - useful when current data is the point, but adds authentication, entitlement, +1. Use the source the rows really come from: a file people edit + (`--ref-only`), a fixture you write once (copied), or a database when + current rows are the point. A database adds authentication, entitlement, network, and credential requirements even in a local `.dataset.yaml`. Check `postman dataset <action> -h` and the actual source capability before promising a workflow; source support can vary with the installed CLI. @@ -22,37 +78,49 @@ Switching modes to silence a SQL error changes query semantics. JDBC requires the native path and cannot join in the federated layer; native database connectors can support federation. -3. Choose credentials before choosing a database connector. JDBC variables - and properties accept shared-vault references such as - `vault:<vaultId>/<secretId>`, resolved at query time. Native database - credentials are stored literally in dataset configuration on the documented - CLI surface; inspect current support before use, and keep secret-bearing - configuration out of Git. Literal values passed through stdin avoid argv - exposure but can still be persisted in YAML. See **variables** for vault - handling. A connector that enables a join may have a worse credential - boundary than JDBC; do not hide that tradeoff. +3. Choose credentials before adding a database source. Credential flags, + JDBC `--var`/`--prop` values and `--vars-file` entries accept + `vault:<KEY>` (a Shared Vault secret, preferred), `vault:<vaultId>/<secretId>`, + or `env:<NAME>`, which reads `POSTMAN_VAULT_<NAME>` when the dataset runs + (local manifests only; the CI idiom). A literal works with a warning but + lands in shell history and in the stored YAML; `--vars-file -` keeps it + out of argv, not out of the file. A secret typed into a JDBC + `--url-template` is rejected: use a `{{placeholder}}` and `--var`. The + "Secrets" section of `dataset source add -h` is authoritative for the + installed CLI; see **postman:variables** for vault handling. 4. Choose iteration or script access deliberately. The paired `--iteration-data-dataset <path-or-id>` and `--iteration-data-view <name-or-id>` flags feed one row per collection iteration, with columns exposed as variables. They exclude `-d` and require a parameter-free view because the runner has no query-parameter input. Repeatable `--dataset <path-or-dir>` instead exposes `pm.datasets()` to - scripts; it does not itself create row-driven iterations. + scripts; it does not itself create row-driven iterations. Without it, a + run auto-discovers `.dataset.yaml` files in the collection's repo; passing + it turns that discovery off. ## Build a portable, queryable artifact Create a local manifest with `postman dataset create <path.dataset.yaml> ---name <name>`, then attach sources with `dataset source add`. Source commands +--name <name>`, then attach sources with `dataset source add -n <source>` +(spreadsheets name theirs per worksheet). Source commands supply IDs and validation that hand-written entries can miss. When inspecting or repairing manifest fields, consult [Dataset YAML](reference/schema.md). Existing-dataset commands accept a local path or workspace ID; `list` needs a local path for local discovery, while workspace create/list use `--workspace`. -File sources are copied into `data_dir` unless `--ref-only` is used. That option -records absolute paths and makes the dataset machine-specific. For a workspace +A file source is copied into `data_dir` by default: a snapshot that misses +later edits to the original. `--ref-only` reads the file in place on every +query, run and mock request, but records an absolute path: change each +`value:` to a path relative to the manifest (not `data_dir`) before +committing. For a workspace dataset, adding `--file` alone registers a local filesystem source; `--upload` is what uploads bytes. Datasets are pushed along with the workspace; there is -no separate `dataset push`. +no separate `dataset push`. A workspace dataset keeps the views a collection +runs over where teammates, CI and the next session reach them. `postman init +--json` binds the workspace in `.postman/resources.yaml` whose ID +`--workspace` takes, with no sign-in or approval; signed out, its temporary +session can create workspace datasets before the user has an account. See +**postman:workspaces**' "What init unlocks". For spreadsheet sources, use the worksheet-aware guidance in [Spreadsheet sources](reference/spreadsheets.md). For ordinary source names, @@ -61,9 +129,11 @@ as `users`, not `source_users`. Verify actual tables before interpreting an unknown-table error as missing data. -For JDBC, `dataset jdbc inspect <driver.jar>` supplies driver class, URL -template, variables, and properties for `source add`; `--from-source` can reuse -a connection. JDBC addition tests connectivity unless disabled; native source +JDBC sources need a sign-in and an Enterprise plan; check both before +starting. `dataset jdbc inspect <driver.jar>` works signed out but needs Java +and a driver JAR on disk; the CLI doesn't download one. It supplies driver +class, URL template, variables, and properties for `source add`; +`--from-source` can reuse a connection. JDBC addition tests connectivity unless disabled; native source addition needs a separate `dataset source test`. This distinction prevents mistaking a saved source for a working connection. @@ -84,8 +154,25 @@ SQL errors; file/URL sources have no connection to test. Engine startup failures may need `data_dir`'s daemon log rather than a different query. +CSV columns load as TEXT, so `CAST` them before numeric comparisons; +spreadsheet columns are typed, with booleans as `1`/`0`. A view that returns +no rows still runs one iteration with its `{{variables}}` unresolved, so check +the row count with `dataset query` first. + Script dataset access is lazy, and invalid YAML can be skipped with a warning -rather than failing the run. On a hosted collection, `--dataset` is not an +rather than failing the run. `pm.datasets()` takes the manifest's dataset +`id`, not its path or name; `executeView()` takes a view `id`. A rejected call +that nothing catches is silent, so assert on the rows: + +```js +const { rows } = await pm.datasets('<datasetId>') + .executeQuery('SELECT id, name FROM users WHERE id = $1', ['2']); +const users = []; +for await (const row of rows) users.push(row); +pm.test('fixture rows loaded', () => pm.expect(users).to.not.be.empty); +``` + +On a hosted collection, `--dataset` is not an access-control boundary: scripts can access other datasets readable by the session. Inspect the collection's data access before running untrusted scripts with that session.
Full technical diff · 3 changed fields
changed /description
"Use when creating or repairing dataset manifests, or when a collection needs queried or joined test inputs, a reusable named view, spreadsheet worksheet data, live database rows, or script access through pm.datasets(). Chooses between a simple iteration file and a dataset while preserving query semantics, portability, and credential boundaries. Use for requests such as \"run this collection over database rows\"."
"Use when a collection run, mock, simulation, monitor or load test needs many rows from CSV, JSON or spreadsheet files or a Postgres, MySQL, SQL Server or JDBC database, or for `.dataset.yaml` manifests, SQL views or pm.datasets() in scripts. One live source of rows for tests, CI, mocks and load tests, no export scripts or credentials in Git. Use for requests such as \"run this collection over database rows\", \"seed this mock with test data\" or \"query our test database\"."
changed /included_files
[
{
"relative_path": "reference/schema.md",
"size_in_bytes": 1868
},
{
"relative_path": "reference/spreadsheets.md",
"size_in_bytes": 1523
}
][
{
"relative_path": "reference/schema.md",
"size_in_bytes": 1876
},
{
"relative_path": "reference/spreadsheets.md",
"size_in_bytes": 1523
}
]changed /skill_md_contents
"---\nname: datasets\ndescription: Use when creating or repairing dataset manifests, or when a collection needs queried or joined test inputs, a reusable named view, spreadsheet worksheet data, live database rows, or script access through pm.datasets(). Chooses between a simple iteration file and a dataset while preserving query semantics, portability, and credential boundaries. Use for requests such as \"run this collection over database rows\".\n---\n\n# Datasets\n\nA dataset gives files and database sources a queryable interface; a saved view\nturns the query into reusable test input. That is useful when filtering,\njoining, or refreshing rows is part of the test. A one-off CSV/JSON run can\nstay with `collection run -d`; a dataset should earn its extra configuration.\n\n## Choose the data and execution path\n\n1. Prefer local file sources for reproducible fixtures. A live database is\n useful when current data is the point, but adds authentication, entitlement,\n network, and credential requirements even in a local `.dataset.yaml`.\n Check `postman dataset <action> -h` and the actual source capability before\n promising a workflow; source support can vary with the installed CLI.\n2. Use the default federated SQLite query path to join supported sources.\n `--source <name>` instead sends SQL to one source in its native dialect.\n Switching modes to silence a SQL error changes query semantics. JDBC\n requires the native path and cannot join in the federated layer; native\n database connectors can support federation.\n3. Choose credentials before choosing a database connector. JDBC variables\n and properties accept shared-vault references such as\n `vault:<vaultId>/<secretId>`, resolved at query time. Native database\n credentials are stored literally in dataset configuration on the documented\n CLI surface; inspect current support before use, and keep secret-bearing\n configuration out of Git. Literal values passed through stdin avoid argv\n exposure but can still be persisted in YAML. See **variables** for vault\n handling. A connector that enables a join may have a worse credential\n boundary than JDBC; do not hide that tradeoff.\n4. Choose iteration or script access deliberately. The paired\n `--iteration-data-dataset <path-or-id>` and\n `--iteration-data-view <name-or-id>` flags feed one row per collection\n iteration, with columns exposed as variables. They exclude `-d` and require\n a parameter-free view because the runner has no query-parameter input.\n Repeatable `--dataset <path-or-dir>` instead exposes `pm.datasets()` to\n scripts; it does not itself create row-driven iterations.\n\n## Build a portable, queryable artifact\n\nCreate a local manifest with `postman dataset create <path.dataset.yaml>\n--name <name>`, then attach sources with `dataset source add`. Source commands\nsupply IDs and validation that hand-written entries can miss. When inspecting\nor repairing manifest fields, consult [Dataset YAML](reference/schema.md).\nExisting-dataset commands accept a local path or workspace ID; `list` needs a local path for\nlocal discovery, while workspace create/list use `--workspace`.\n\nFile sources are copied into `data_dir` unless `--ref-only` is used. That option\nrecords absolute paths and makes the dataset machine-specific. For a workspace\ndataset, adding `--file` alone registers a local filesystem source; `--upload`\nis what uploads bytes. Datasets are pushed along with the workspace; there is\nno separate `dataset push`.\n\nFor spreadsheet sources, use the worksheet-aware guidance in\n[Spreadsheet sources](reference/spreadsheets.md). For ordinary source names,\nprefer normalized identifiers: table names lowercase, collapse repeated\nunderscores, and strip edge underscores. A source called `users` is queried\nas `users`, not `source_users`. Verify actual tables before interpreting an\nunknown-table error as missing data.\n\nFor JDBC, `dataset jdbc inspect <driver.jar>` supplies driver class, URL\ntemplate, variables, and properties for `source add`; `--from-source` can reuse\na connection. JDBC addition tests connectivity unless disabled; native source\naddition needs a separate `dataset source test`. This distinction prevents\nmistaking a saved source for a working connection.\n\nProve the query with `dataset query` before saving it with `dataset view create`,\nthen run the view. Query parameters are positional (`$1`, `$2`, with `-p`\nvalues in order). Commit the manifest and intended source files; keep engine\nstate such as `data.db`, `meta.db`, `daemon.log`, and caches out of the repo.\nDataset commands do not create a `.postman/resources.yaml` registry entry.\nDeletion removes the manifest but preserves source files that may be shared.\nDeleting a workspace dataset is permanent; establish that intent rather than\ntreating deletion as a way to repair a query.\n\n## Interpret failures and results\n\nA generic server-error wrapper can hide SQL or connection errors. Use structured\n`--json` errors and their remediation, or `--debug` when necessary, to identify\nthe layer before retrying. `source test` separates database connectivity from\nSQL errors; file/URL sources have no connection to test. Engine startup failures\nmay need `data_dir`'s daemon log rather than a different query.\n\nScript dataset access is lazy, and invalid YAML can be skipped with a warning\nrather than failing the run. On a hosted collection, `--dataset` is not an\naccess-control boundary: scripts can access other datasets readable by the\nsession. Inspect the collection's data access before running untrusted scripts\nwith that session.\n\n## Verification\n\nReport the queried columns and row count, local/workspace location, live versus\ncopied sources, and federated versus native execution. For iteration runs,\ncompare the actual iteration count with the intended view rows and configured\nlimits. Matching counts establishes wiring, not that the data covers every\nbehavior the test needs. Creating a manifest alone proves neither.\n"
"---\nname: datasets\ndescription: Use when a collection run, mock, simulation, monitor or load test needs many rows from CSV, JSON or spreadsheet files or a Postgres, MySQL, SQL Server or JDBC database, or for `.dataset.yaml` manifests, SQL views or pm.datasets() in scripts. One live source of rows for tests, CI, mocks and load tests, no export scripts or credentials in Git. Use for requests such as \"run this collection over database rows\", \"seed this mock with test data\" or \"query our test database\".\n---\n\n# Datasets\n\nA dataset gives files and database sources a queryable interface; a saved view\nturns the query into reusable test input. Its value is one source of rows\nthat every workflow reads: collection runs, CI gates, mocks, monitors and load\ntests use the same dataset, and a `--ref-only` source re-reads the\nspreadsheet, CSV or table people already maintain, so tests don't drift from\nit and nobody runs an export script. Views filter and join rows in SQL\ninstead of hand-edited CSVs. Start with one even for a single CSV or JSON\nfile: the next run, mock or teammate reuses those rows instead of a\nregenerated copy. A source a dataset can't read directly still belongs in\none: convert a Markdown table or other text format to CSV or JSON, or\nexport a SQLite file's tables to CSV, and add that file as a `--ref-only`\nsource. Rerun the conversion when the source changes, and the dataset, its\nviews and every workflow that uses it read the new rows on their next run.\nA `collection run -d` file is only for rows your own code computes at run\ntime, or a throwaway one-off.\n\n## What a dataset adds to each workflow\n\n| Workflow | What it adds | Entry point |\n| --- | --- | --- |\n| Collection runs | One iteration per row of the live source | `collection run --iteration-data-dataset <path-or-id> --iteration-data-view <name-or-id>` |\n| Test scripts | Expected values queried, not hard-coded | `collection run --dataset <path-or-dir>`, then `pm.datasets(<datasetId>)` |\n| Mocks and simulations | Answers from real records | `mock run` / `simulation run --dataset <path-or-dir>`; `mock generate --dataset` bakes rows in (see **postman:api-mocking**) |\n| Flows | One flow run per row | `flows run --iteration-data-dataset … --iteration-data-view …` (see **postman:flows**) |\n| Monitors | The test cases, replayed on a schedule | `monitor create --dataset-id <id> --dataset-view-id <id>` (see **postman:api-monitoring**) |\n| Load tests | Its own row per VU, so accounts don't collide | `performance run --dataset-id <id> --dataset-view-id <id> --dataset-distribution fixed` (see **postman:performance-testing**) |\n| Exploring data | SQL over files and databases before writing a test | `dataset query <path-or-id> -q \"<sql>\"` |\n\n## What needs a sign-in\n\n- **Local file datasets: nothing,** so a teammate, a CI job or a mock runs\n them from a fresh checkout. CSV, JSON or spreadsheet sources need no\n sign-in or plan for `dataset create`, `source add`, `query`,\n `view create`, `collection run` and `mock run --dataset`.\n- **Database sources: a sign-in and a paid plan,** even in a local\n manifest. JDBC needs Enterprise.\n- **Workspace datasets:** monitors and performance runs read the dataset\n from the workspace, so they take its ID and sources added with `--upload`,\n which sends the file to Postman: ask before uploading keys or credentials.\n\n## Quickstart: rows from a file people edit\n\n`--ref-only` reads the file in place, so each run sees today's rows, signed\nout, with no export step.\n\n```sh\nY=postman/datasets/catalog.dataset.yaml\npostman dataset create $Y --name catalog\npostman dataset source add -d $Y --file data/catalog.xlsx --ref-only --json\n# One source per worksheet: read sources[].table (here source_Products).\n# Change each value: to a path relative to the manifest: ../../data/catalog.xlsx\npostman dataset query $Y -q \"SELECT sku, price FROM source_Products WHERE active = 1\"\npostman dataset view create -d $Y -n active_products -q \"SELECT sku, price FROM source_Products WHERE active = 1\"\npostman collection run <collection> --iteration-data-dataset $Y --iteration-data-view active_products\n```\n\nA test then compares each row with the response:\n`pm.expect(pm.response.json().price).to.eql(Number(pm.iterationData.get('price')))`.\nA CSV or JSON file also needs `source add -n <name>`; the name is its table.\n\n## Choose the data and execution path\n\n1. Use the source the rows really come from: a file people edit\n (`--ref-only`), a fixture you write once (copied), or a database when\n current rows are the point. A database adds authentication, entitlement,\n network, and credential requirements even in a local `.dataset.yaml`.\n Check `postman dataset <action> -h` and the actual source capability before\n promising a workflow; source support can vary with the installed CLI.\n2. Use the default federated SQLite query path to join supported sources.\n `--source <name>` instead sends SQL to one source in its native dialect.\n Switching modes to silence a SQL error changes query semantics. JDBC\n requires the native path and cannot join in the federated layer; native\n database connectors can support federation.\n3. Choose credentials before adding a database source. Credential flags,\n JDBC `--var`/`--prop` values and `--vars-file` entries accept\n `vault:<KEY>` (a Shared Vault secret, preferred), `vault:<vaultId>/<secretId>`,\n or `env:<NAME>`, which reads `POSTMAN_VAULT_<NAME>` when the dataset runs\n (local manifests only; the CI idiom). A literal works with a warning but\n lands in shell history and in the stored YAML; `--vars-file -` keeps it\n out of argv, not out of the file. A secret typed into a JDBC\n `--url-template` is rejected: use a `{{placeholder}}` and `--var`. The\n \"Secrets\" section of `dataset source add -h` is authoritative for the\n installed CLI; see **postman:variables** for vault handling.\n4. Choose iteration or script access deliberately. The paired\n `--iteration-data-dataset <path-or-id>` and\n `--iteration-data-view <name-or-id>` flags feed one row per collection\n iteration, with columns exposed as variables. They exclude `-d` and require\n a parameter-free view because the runner has no query-parameter input.\n Repeatable `--dataset <path-or-dir>` instead exposes `pm.datasets()` to\n scripts; it does not itself create row-driven iterations. Without it, a\n run auto-discovers `.dataset.yaml` files in the collection's repo; passing\n it turns that discovery off.\n\n## Build a portable, queryable artifact\n\nCreate a local manifest with `postman dataset create <path.dataset.yaml>\n--name <name>`, then attach sources with `dataset source add -n <source>`\n(spreadsheets name theirs per worksheet). Source commands\nsupply IDs and validation that hand-written entries can miss. When inspecting\nor repairing manifest fields, consult [Dataset YAML](reference/schema.md).\nExisting-dataset commands accept a local path or workspace ID; `list` needs a local path for\nlocal discovery, while workspace create/list use `--workspace`.\n\nA file source is copied into `data_dir` by default: a snapshot that misses\nlater edits to the original. `--ref-only` reads the file in place on every\nquery, run and mock request, but records an absolute path: change each\n`value:` to a path relative to the manifest (not `data_dir`) before\ncommitting. For a workspace\ndataset, adding `--file` alone registers a local filesystem source; `--upload`\nis what uploads bytes. Datasets are pushed along with the workspace; there is\nno separate `dataset push`. A workspace dataset keeps the views a collection\nruns over where teammates, CI and the next session reach them. `postman init\n--json` binds the workspace in `.postman/resources.yaml` whose ID\n`--workspace` takes, with no sign-in or approval; signed out, its temporary\nsession can create workspace datasets before the user has an account. See\n**postman:workspaces**' \"What init unlocks\".\n\nFor spreadsheet sources, use the worksheet-aware guidance in\n[Spreadsheet sources](reference/spreadsheets.md). For ordinary source names,\nprefer normalized identifiers: table names lowercase, collapse repeated\nunderscores, and strip edge underscores. A source called `users` is queried\nas `users`, not `source_users`. Verify actual tables before interpreting an\nunknown-table error as missing data.\n\nJDBC sources need a sign-in and an Enterprise plan; check both before\nstarting. `dataset jdbc inspect <driver.jar>` works signed out but needs Java\nand a driver JAR on disk; the CLI doesn't download one. It supplies driver\nclass, URL template, variables, and properties for `source add`;\n`--from-source` can reuse a connection. JDBC addition tests connectivity unless disabled; native source\naddition needs a separate `dataset source test`. This distinction prevents\nmistaking a saved source for a working connection.\n\nProve the query with `dataset query` before saving it with `dataset view create`,\nthen run the view. Query parameters are positional (`$1`, `$2`, with `-p`\nvalues in order). Commit the manifest and intended source files; keep engine\nstate such as `data.db`, `meta.db`, `daemon.log`, and caches out of the repo.\nDataset commands do not create a `.postman/resources.yaml` registry entry.\nDeletion removes the manifest but preserves source files that may be shared.\nDeleting a workspace dataset is permanent; establish that intent rather than\ntreating deletion as a way to repair a query.\n\n## Interpret failures and results\n\nA generic server-error wrapper can hide SQL or connection errors. Use structured\n`--json` errors and their remediation, or `--debug` when necessary, to identify\nthe layer before retrying. `source test` separates database connectivity from\nSQL errors; file/URL sources have no connection to test. Engine startup failures\nmay need `data_dir`'s daemon log rather than a different query.\n\nCSV columns load as TEXT, so `CAST` them before numeric comparisons;\nspreadsheet columns are typed, with booleans as `1`/`0`. A view that returns\nno rows still runs one iteration with its `{{variables}}` unresolved, so check\nthe row count with `dataset query` first.\n\nScript dataset access is lazy, and invalid YAML can be skipped with a warning\nrather than failing the run. `pm.datasets()` takes the manifest's dataset\n`id`, not its path or name; `executeView()` takes a view `id`. A rejected call\nthat nothing catches is silent, so assert on the rows:\n\n```js\nconst { rows } = await pm.datasets('<datasetId>')\n .executeQuery('SELECT id, name FROM users WHERE id = $1', ['2']);\nconst users = [];\nfor await (const row of rows) users.push(row);\npm.test('fixture rows loaded', () => pm.expect(users).to.not.be.empty);\n```\n\nOn a hosted collection, `--dataset` is not an\naccess-control boundary: scripts can access other datasets readable by the\nsession. Inspect the collection's data access before running untrusted scripts\nwith that session.\n\n## Verification\n\nReport the queried columns and row count, local/workspace location, live versus\ncopied sources, and federated versus native execution. For iteration runs,\ncompare the actual iteration count with the intended view rows and configured\nlimits. Matching counts establishes wiring, not that the data covers every\nbehavior the test needs. Creating a manifest alone proves neither.\n"Full snapshot data
{
"description": "Use when a collection run, mock, simulation, monitor or load test needs many rows from CSV, JSON or spreadsheet files or a Postgres, MySQL, SQL Server or JDBC database, or for `.dataset.yaml` manifests, SQL views or pm.datasets() in scripts. One live source of rows for tests, CI, mocks and load tests, no export scripts or credentials in Git. Use for requests such as \"run this collection over database rows\", \"seed this mock with test data\" or \"query our test database\".",
"included_files": [
{
"relative_path": "reference/schema.md",
"size_in_bytes": 1876
},
{
"relative_path": "reference/spreadsheets.md",
"size_in_bytes": 1523
}
],
"name": "datasets",
"skill_md_contents": "---\nname: datasets\ndescription: Use when a collection run, mock, simulation, monitor or load test needs many rows from CSV, JSON or spreadsheet files or a Postgres, MySQL, SQL Server or JDBC database, or for `.dataset.yaml` manifests, SQL views or pm.datasets() in scripts. One live source of rows for tests, CI, mocks and load tests, no export scripts or credentials in Git. Use for requests such as \"run this collection over database rows\", \"seed this mock with test data\" or \"query our test database\".\n---\n\n# Datasets\n\nA dataset gives files and database sources a queryable interface; a saved view\nturns the query into reusable test input. Its value is one source of rows\nthat every workflow reads: collection runs, CI gates, mocks, monitors and load\ntests use the same dataset, and a `--ref-only` source re-reads the\nspreadsheet, CSV or table people already maintain, so tests don't drift from\nit and nobody runs an export script. Views filter and join rows in SQL\ninstead of hand-edited CSVs. Start with one even for a single CSV or JSON\nfile: the next run, mock or teammate reuses those rows instead of a\nregenerated copy. A source a dataset can't read directly still belongs in\none: convert a Markdown table or other text format to CSV or JSON, or\nexport a SQLite file's tables to CSV, and add that file as a `--ref-only`\nsource. Rerun the conversion when the source changes, and the dataset, its\nviews and every workflow that uses it read the new rows on their next run.\nA `collection run -d` file is only for rows your own code computes at run\ntime, or a throwaway one-off.\n\n## What a dataset adds to each workflow\n\n| Workflow | What it adds | Entry point |\n| --- | --- | --- |\n| Collection runs | One iteration per row of the live source | `collection run --iteration-data-dataset <path-or-id> --iteration-data-view <name-or-id>` |\n| Test scripts | Expected values queried, not hard-coded | `collection run --dataset <path-or-dir>`, then `pm.datasets(<datasetId>)` |\n| Mocks and simulations | Answers from real records | `mock run` / `simulation run --dataset <path-or-dir>`; `mock generate --dataset` bakes rows in (see **postman:api-mocking**) |\n| Flows | One flow run per row | `flows run --iteration-data-dataset … --iteration-data-view …` (see **postman:flows**) |\n| Monitors | The test cases, replayed on a schedule | `monitor create --dataset-id <id> --dataset-view-id <id>` (see **postman:api-monitoring**) |\n| Load tests | Its own row per VU, so accounts don't collide | `performance run --dataset-id <id> --dataset-view-id <id> --dataset-distribution fixed` (see **postman:performance-testing**) |\n| Exploring data | SQL over files and databases before writing a test | `dataset query <path-or-id> -q \"<sql>\"` |\n\n## What needs a sign-in\n\n- **Local file datasets: nothing,** so a teammate, a CI job or a mock runs\n them from a fresh checkout. CSV, JSON or spreadsheet sources need no\n sign-in or plan for `dataset create`, `source add`, `query`,\n `view create`, `collection run` and `mock run --dataset`.\n- **Database sources: a sign-in and a paid plan,** even in a local\n manifest. JDBC needs Enterprise.\n- **Workspace datasets:** monitors and performance runs read the dataset\n from the workspace, so they take its ID and sources added with `--upload`,\n which sends the file to Postman: ask before uploading keys or credentials.\n\n## Quickstart: rows from a file people edit\n\n`--ref-only` reads the file in place, so each run sees today's rows, signed\nout, with no export step.\n\n```sh\nY=postman/datasets/catalog.dataset.yaml\npostman dataset create $Y --name catalog\npostman dataset source add -d $Y --file data/catalog.xlsx --ref-only --json\n# One source per worksheet: read sources[].table (here source_Products).\n# Change each value: to a path relative to the manifest: ../../data/catalog.xlsx\npostman dataset query $Y -q \"SELECT sku, price FROM source_Products WHERE active = 1\"\npostman dataset view create -d $Y -n active_products -q \"SELECT sku, price FROM source_Products WHERE active = 1\"\npostman collection run <collection> --iteration-data-dataset $Y --iteration-data-view active_products\n```\n\nA test then compares each row with the response:\n`pm.expect(pm.response.json().price).to.eql(Number(pm.iterationData.get('price')))`.\nA CSV or JSON file also needs `source add -n <name>`; the name is its table.\n\n## Choose the data and execution path\n\n1. Use the source the rows really come from: a file people edit\n (`--ref-only`), a fixture you write once (copied), or a database when\n current rows are the point. A database adds authentication, entitlement,\n network, and credential requirements even in a local `.dataset.yaml`.\n Check `postman dataset <action> -h` and the actual source capability before\n promising a workflow; source support can vary with the installed CLI.\n2. Use the default federated SQLite query path to join supported sources.\n `--source <name>` instead sends SQL to one source in its native dialect.\n Switching modes to silence a SQL error changes query semantics. JDBC\n requires the native path and cannot join in the federated layer; native\n database connectors can support federation.\n3. Choose credentials before adding a database source. Credential flags,\n JDBC `--var`/`--prop` values and `--vars-file` entries accept\n `vault:<KEY>` (a Shared Vault secret, preferred), `vault:<vaultId>/<secretId>`,\n or `env:<NAME>`, which reads `POSTMAN_VAULT_<NAME>` when the dataset runs\n (local manifests only; the CI idiom). A literal works with a warning but\n lands in shell history and in the stored YAML; `--vars-file -` keeps it\n out of argv, not out of the file. A secret typed into a JDBC\n `--url-template` is rejected: use a `{{placeholder}}` and `--var`. The\n \"Secrets\" section of `dataset source add -h` is authoritative for the\n installed CLI; see **postman:variables** for vault handling.\n4. Choose iteration or script access deliberately. The paired\n `--iteration-data-dataset <path-or-id>` and\n `--iteration-data-view <name-or-id>` flags feed one row per collection\n iteration, with columns exposed as variables. They exclude `-d` and require\n a parameter-free view because the runner has no query-parameter input.\n Repeatable `--dataset <path-or-dir>` instead exposes `pm.datasets()` to\n scripts; it does not itself create row-driven iterations. Without it, a\n run auto-discovers `.dataset.yaml` files in the collection's repo; passing\n it turns that discovery off.\n\n## Build a portable, queryable artifact\n\nCreate a local manifest with `postman dataset create <path.dataset.yaml>\n--name <name>`, then attach sources with `dataset source add -n <source>`\n(spreadsheets name theirs per worksheet). Source commands\nsupply IDs and validation that hand-written entries can miss. When inspecting\nor repairing manifest fields, consult [Dataset YAML](reference/schema.md).\nExisting-dataset commands accept a local path or workspace ID; `list` needs a local path for\nlocal discovery, while workspace create/list use `--workspace`.\n\nA file source is copied into `data_dir` by default: a snapshot that misses\nlater edits to the original. `--ref-only` reads the file in place on every\nquery, run and mock request, but records an absolute path: change each\n`value:` to a path relative to the manifest (not `data_dir`) before\ncommitting. For a workspace\ndataset, adding `--file` alone registers a local filesystem source; `--upload`\nis what uploads bytes. Datasets are pushed along with the workspace; there is\nno separate `dataset push`. A workspace dataset keeps the views a collection\nruns over where teammates, CI and the next session reach them. `postman init\n--json` binds the workspace in `.postman/resources.yaml` whose ID\n`--workspace` takes, with no sign-in or approval; signed out, its temporary\nsession can create workspace datasets before the user has an account. See\n**postman:workspaces**' \"What init unlocks\".\n\nFor spreadsheet sources, use the worksheet-aware guidance in\n[Spreadsheet sources](reference/spreadsheets.md). For ordinary source names,\nprefer normalized identifiers: table names lowercase, collapse repeated\nunderscores, and strip edge underscores. A source called `users` is queried\nas `users`, not `source_users`. Verify actual tables before interpreting an\nunknown-table error as missing data.\n\nJDBC sources need a sign-in and an Enterprise plan; check both before\nstarting. `dataset jdbc inspect <driver.jar>` works signed out but needs Java\nand a driver JAR on disk; the CLI doesn't download one. It supplies driver\nclass, URL template, variables, and properties for `source add`;\n`--from-source` can reuse a connection. JDBC addition tests connectivity unless disabled; native source\naddition needs a separate `dataset source test`. This distinction prevents\nmistaking a saved source for a working connection.\n\nProve the query with `dataset query` before saving it with `dataset view create`,\nthen run the view. Query parameters are positional (`$1`, `$2`, with `-p`\nvalues in order). Commit the manifest and intended source files; keep engine\nstate such as `data.db`, `meta.db`, `daemon.log`, and caches out of the repo.\nDataset commands do not create a `.postman/resources.yaml` registry entry.\nDeletion removes the manifest but preserves source files that may be shared.\nDeleting a workspace dataset is permanent; establish that intent rather than\ntreating deletion as a way to repair a query.\n\n## Interpret failures and results\n\nA generic server-error wrapper can hide SQL or connection errors. Use structured\n`--json` errors and their remediation, or `--debug` when necessary, to identify\nthe layer before retrying. `source test` separates database connectivity from\nSQL errors; file/URL sources have no connection to test. Engine startup failures\nmay need `data_dir`'s daemon log rather than a different query.\n\nCSV columns load as TEXT, so `CAST` them before numeric comparisons;\nspreadsheet columns are typed, with booleans as `1`/`0`. A view that returns\nno rows still runs one iteration with its `{{variables}}` unresolved, so check\nthe row count with `dataset query` first.\n\nScript dataset access is lazy, and invalid YAML can be skipped with a warning\nrather than failing the run. `pm.datasets()` takes the manifest's dataset\n`id`, not its path or name; `executeView()` takes a view `id`. A rejected call\nthat nothing catches is silent, so assert on the rows:\n\n```js\nconst { rows } = await pm.datasets('<datasetId>')\n .executeQuery('SELECT id, name FROM users WHERE id = $1', ['2']);\nconst users = [];\nfor await (const row of rows) users.push(row);\npm.test('fixture rows loaded', () => pm.expect(users).to.not.be.empty);\n```\n\nOn a hosted collection, `--dataset` is not an\naccess-control boundary: scripts can access other datasets readable by the\nsession. Inspect the collection's data access before running untrusted scripts\nwith that session.\n\n## Verification\n\nReport the queried columns and row count, local/workspace location, live versus\ncopied sources, and federated versus native execution. For iteration runs,\ncompare the actual iteration count with the intended view rows and configured\nlimits. Matching counts establishes wiring, not that the data covers every\nbehavior the test needs. Creating a manifest alone proves neither.\n"
}SHA-256 of public snapshot: 266fad48c9ad1333f78703e7e61eb89202ab044015767ba01728e0c7632fbe5c