Docs Menu
Docs Home
/
MongoDB Atlas
/

Load Data into Atlas

On this page

  • Load Sample Data
  • Available Sample Datasets
  • Sample Data Namespaces
  • Tutorials Using Sample Data
  • MongoDB Courses that Use Sample Data

Estimated completion time: 5 minutes

Atlas provides sample data you can load into your Atlas clusters. You can use this data to quickly get started experimenting with data in MongoDB and using tools such as the Atlas UI and MongoDB Charts.

For a list of datasets in the sample and a description of each, see Available Sample Datasets. Each dataset page contains information on the databases, collections, and indexes in the dataset.

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.

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

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

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

You can load sample data into your Atlas cluster from the Atlas CLI or the Atlas UI.

Select the appropriate tab based on how you would like to load sample data:

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.

Tip

See: Related Links

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. If the Clusters page is not already displayed, click Database in the sidebar.

    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.

Tip

If prompted, select all available datasets.

3

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

4

Click the Browse Collections button for your cluster.

The Data Explorer displays.

5

You should see the following databases in your cluster:

  • sample_airbnb

  • sample_analytics

  • sample_geospatial

  • sample_guides

  • sample_mflix

  • sample_restaurants

  • sample_supplies

  • sample_training

  • sample_weatherdata

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

6

Complete the following steps to run a query on the restaurants collection in the sample_restaurants database:

  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.

Important

You can load sample data through the Collection View only if you have Data Explorer enabled and you don't have any data already in your collection.

To load sample data into your cluster from the Collections 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. If the Clusters page is not already displayed, click Database in the sidebar.

    The Clusters page displays.

2

Click the Browse Collections button for your cluster.

The Data Explorer displays.

3

Tip

If prompted, select all available datasets.

4

Once the load completes, the view refreshes to show your sample data.

You should see the following databases in your cluster:

  • sample_airbnb

  • sample_analytics

  • sample_geospatial

  • sample_guides

  • sample_mflix

  • sample_restaurants

  • sample_supplies

  • sample_training

  • sample_weatherdata

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

The following table shows the sample datasets available for Atlas clusters. Click a sample dataset to learn more about it.

For instructions on loading this sample data into your Atlas cluster, see Load Sample Data.

Dataset Name
Description
Contains training data for a mock financial services application.
Contains shipwreck data.
Contains planet data.
Contains movie data.
Contains restaurant data.
Contains data from a mock office supply store.
Contains MongoDB training services dataset.
Contains detailed weather reports.

When you load the sample data, Atlas creates the following namespaces on your cluster:

Warning

If any of these namespaces already exist on your cluster when you attempt to load the sample data, the operation will fail and no sample data will be loaded into your cluster.

Database
Collection
sample_airbnb
listingsAndReviews
sample_analytics
accounts
sample_analytics
customers
sample_analytics
transactions
sample_geospatial
shipwrecks
sample_guides
planets
sample_mflix
comments
sample_mflix
embedded_movies
sample_mflix
movies
sample_mflix
theaters
sample_mflix
users
sample_supplies
sales
sample_training
companies
sample_training
grades
sample_training
inspections
sample_training
posts
sample_training
routes
sample_training
trips
sample_training
zips
sample_weatherdata
data

The Get Started with Atlas tutorial walks through setting up an Atlas cluster and populating that cluster with sample data.

Get Started with Atlas Search
Create an Atlas Search index using data from the sample_mflix sample database and run queries against the movies collection in the sample database.
Atlas Search Tutorials
Create and query an Atlas Search index. Most of these tutorials use the sample_mflix sample database, and with them, you can learn to query using autocomplete, a date range filter, and across multiple languages.

The following MongoDB Charts tutorials guide you through visualizing sample data provided by Atlas:

Visualizing Order Data
Visualize the Sample Supply Store Dataset, which contains sales order data from a mock office supply company.
Visualizing Movie Details
Visualize the Sample Mflix Dataset, which contains data on movies and movie theaters.

Tip

To visualize data in MongoDB Charts from the Atlas UI, click Visualize Your Data when viewing a specific database or collection. Charts loads the data source and you can start building a chart in the Charts view. For detailed steps, see Build Charts.

Instructor-led Training
Get quickly ramped on MongoDB with comprehensive private training programs for developers and operations teams.

Back

Insert and View a Document