> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Manage datasets in Postman

<Info class="plan">
  Datasets are available on Postman Solo, Team, and Enterprise plans. For more information, see the [pricing page](https://www.postman.com/pricing/).
</Info>

You can manage your datasets to keep their data sources and views current. As your workflows evolve, you can add new data sources, update existing ones, and modify views to control how data is retrieved and used in your tests, scripts, and mock servers.

<Note>
  Datasets are only supported in Local View on the Postman desktop app.
</Note>

## Manage datasets

You can manage a dataset to update its details or make changes to how it's stored in your workspace. Each dataset is defined by a [YAML file in your local Git repository](/docs/tests-and-scripts/datasets/create-datasets#about-the-dataset-file), which includes its data sources and views.

To manage a dataset, do the following:

1. Click <img alt="Items icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-items-stroke.svg#icon" width="20px" /> **Items** in the sidebar.
2. Click **Datasets**.
3. Next to a dataset, click <img alt="Options icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-options-stroke.svg#icon" width="20px" /> **View more actions**.

You can perform the following actions:

* **Rename** — Change the dataset's name.
* **Edit YAML** — Open and edit the dataset's YAML file directly. This file defines the dataset's data sources and views and is stored in your local Git repository. The file also includes metadata about the dataset, such as its name and ID.
* **Delete** — Remove the dataset from your workspace.

## Manage data sources

You can expand an existing dataset by adding a new data source or updating an existing one. A data source defines where your dataset's data comes from, such as a local file or an external database connection. You can add multiple data sources to a dataset.

### Add a new data source

To add a new data source, do the following:

1. Click <img alt="Items icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-items-stroke.svg#icon" width="20px" /> **Items** in the sidebar.
2. Click **Datasets**.
3. For a dataset you want to update, click <img alt="Add icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-add-stroke.svg#icon" width="20px" /> **Add source** next to **Sources**.
4. Click **Add New Source**.
5. Click the data source dropdown list, then select a [data source type](/docs/tests-and-scripts/datasets/create-datasets#data-source-types).
6. Configure the data source.
7. (Optional) Click **Add New Source** to add more data sources to the dataset. Add multiple data sources to combine different types of data in your workflows.
8. Click **Save**.

You can also click <img alt="Delete icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-delete-stroke.svg#icon" width="20px" /> next to a data source to remove it from the dataset. Make sure to update any views that use the existing data source because deleting it will break those views.

### Update an existing data source

To update a data source, do the following:

1. Click <img alt="Items icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-items-stroke.svg#icon" width="20px" /> **Items** in the sidebar.
2. Click **Datasets**.
3. Select a data source to update.
4. Update the data source configuration according to the [data source type](/docs/tests-and-scripts/datasets/create-datasets#data-source-types). You can also update the configuration from the **Settings** tab, depending on the data source type.
5. Click **Refresh** to update the preview with the latest data from the file or database. You can view the preview from the **Data** tab.

Next to a data source, you can click <img alt="Options icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-options-stroke.svg#icon" width="20px" /> **View more actions** to do the following:

* **Rename** — Change the data source's name.
* **Delete** — Remove the data source from the dataset. Make sure to update any views that use this data source because deleting it will break those views.

### Update a data source with Agent Mode

You can use [Agent Mode](/docs/agent-mode/overview) to add new data sources or update existing ones with sample data. This is useful when you want to quickly refresh test data or expand a dataset without manually editing files or database records.

For local data sources, Agent Mode can create or update CSV or JSON files with additional or modified data. For example, you could ask Agent Mode the following:

```text wordWrap
Add 5 new users with realistic data to my dataset, including userId, name, and email fields.
```

If you have a connected database, you can use Agent Mode to generate and insert sample data into existing tables. For example, you could ask:

```text wordWrap
Generate 10 sample orders with realistic data and insert them into the orders table in my connected MySQL database.
```

After updating the data source, you can refresh the data source and [update your views](#manage-views) as needed to reflect the changes.

## Manage views

You can add a new view or update an existing one to change how data is retrieved from your dataset. A view defines how data is filtered, combined, or transformed for your workflows. For example, you might update a view's query to return only a subset of data from the data source, or to create new columns based on existing data.

To add or update a view, do the following:

1. Click <img alt="Items icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-items-stroke.svg#icon" width="20px" /> **Items** in the sidebar.

2. Click **Datasets**.

3. Choose one of the following:

   * To add a new view, click <img alt="Add icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-add-stroke.svg#icon" width="20px" /> **Add view** next to **Views**.
   * To update an existing view, select a view.

4. Enter an SQLite-compatible query to define how the data is retrieved from the data source. To learn more about writing queries, see [Example dataset views](/docs/tests-and-scripts/datasets/example-dataset-views).

5. Click **Run** to execute the query.

6. In the table pane, you can preview and search the query results.

Next to a view, you can click <img alt="Options icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-options-stroke.svg#icon" width="20px" /> **View more actions** to do the following:

* **Rename** — Change the view's name.
* **Preview** — Preview a subset of the data returned by the view's query.
* **Delete** — Remove the view from the dataset. This doesn't delete the underlying data source, but it does remove the view's query and any transformations it applies to the data.

## Troubleshoot datasets

If you encounter issues when working with datasets, use the following troubleshooting steps to identify and resolve common problems.

The error icon `(!)` may appear next to a dataset in the left sidebar in the following scenarios:

* **Dataset is out of sync** — This can happen if you edit dataset files outside of Postman or if there are unresolved merge conflicts. Restart Postman to resync the dataset with your local files.

* **Invalid or corrupted dataset files** — This can happen if the dataset files have invalid formatting or content. Check the files in your local Git repository for formatting issues, or restore them from a previous commit if recent changes caused the issue.

If you have any issues with your datasets, [contact Postman support](https://www.postman.com/support/).