For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Import Sample Data Into Your Atlas Deployment

Estimated completion time: 5 minutes

Use this tutorial to load sample data into your Atlas clusters. You can load sample data into your Atlas cluster from the Atlas CLI or the Atlas UI. Select your interface from the drop-down menu. For more information on the available sample datasets, see Sample Datasets.

To utilize the sample data provided by Atlas, you must create an Atlas cluster to load data into. To learn more, see Cluster Types.

To load sample data, you must also have Project Owner access to the project.

Users with Organization Owner access must add themselves to the project as a Project Owner.

To load sample data into your cluster from the Clusters view:

1
  1. If it's not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. In the sidebar, click Clusters under the Database heading.

The Clusters page displays.

2
  1. Locate the cluster where you want to load sample data.

  2. Click the Ellipses (...) button for your cluster.

  3. Click Load Sample Dataset.

    The Load sample data dialog box opens.

  4. In the dialog box, choose which datasets to load from the drop-down menu.

    For details on the collections and documents included in these datasets, see Available Sample Datasets.

    To load all available sample datasets, click Select All.

3

The dialog box closes and Atlas begins loading your sample dataset into your cluster.

4
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Data Explorer under the Database heading.

    The Data Explorer displays.

IMPORTANT: You can also click the name of a cluster to open the Cluster sidebar, and then click Data Explorer under the Shortcuts heading.

5

You should see the databases that you loaded in your cluster in the Collections view.

6

For example, if you loaded the sample_restaurants dataset:

  1. In the left navigation of the Collections page, select the sample_restaurants database and then the restaurants collection.

  2. To find all restaurants located in Queens, copy the following query filter document into the Filter search bar.

    { borough: "Queens" }
  3. Click Apply.

  4. Atlas shows documents where the borough field corresponds to Queens.

    To learn more, see Query Documents.

To load sample data into the specified cluster using the Atlas CLI, run the following command:

atlas clusters sampleData load <clusterName> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas clusters sampleData load.

After you run the command to load sample data, you can use the following Atlas CLI commands to monitor the status of the sample data load job:

To return the details for the specified sample data load job using the Atlas CLI, run the following command:

atlas clusters sampleData describe <id> [options]

To watch the specified sample data job in your cluster until it completes using the Atlas CLI, run the following command:

atlas clusters sampleData watch <id> [options]

To learn more about the syntax and parameters for the previous commands, see the Atlas CLI documentation for atlas clusters sampleData describe and atlas clusters sampleData watch.

You can also generate synthetic data that aligns to your real data's schema. To learn more, see Generate Synthetic Data.

To import your own data, see Migrate or Import Data.