Docs Menu

Docs HomeLaunch & Manage MongoDBMongoDB Atlas

Advanced Configuration

On this page

  • Prerequisites
  • Create a Federated Database Instance
  • Connect to Your Federated Database Instance

This page guides you through setting up your own federated database instance and importing sample data.

MongoDB Atlas SQL setup diagram

To create a federated database instance and map it to sample data:

1

If it isn't already displayed, click Data Federation in the sidebar.

2

If you have an existing federated database instance, instead click Create Federated Database in the top right corner of the dashboard.

3

You can use a sample dataset to start exploring Atlas SQL through Atlas Data Federation without configuring a data source yourself. This tutorial references a specific sample dataset.

Note

To connect to your own data instead, click Add Data Sources. To learn more about configuring different types of data sources, see Define Data Stores for a Federated Database Instance.

If you want to configure data from a Atlas cluster, you must use MongoDB version 5.0 or greater for that cluster to take advantage of Atlas SQL.

  1. Click Add Sample Data.

  2. Select AWS S3 from the Filter dropdown if it isn't selected already.

  3. Expand the S3 store sample-data-atlas-data-lake if it isn't expanded already.

For this tutorial, configure your federated database instance as follows using the Federated Database Instance panel:

1

Click next to the default collection VirtualCollection0 to edit its name. For this tutorial, rename your collection Sessions.

2

Click next to the default name VirtualDatabase0 to add a collection to the database. For this tutorial, name your new collection Users.

3

Drag and drop the following data sources into the respective federated database instance virtual collections:

  • /mflix/sessions.json, into the Sessions collection, and

  • /mflix/users.json into the Users collection.

4

Your federated database instance appears on the Data Federation page.

To learn more about configuring Atlas Data Federation with real data stores, see Define Data Stores for a Federated Database Instance.

To connect to your federated database instance and query sample data or your own data with Atlas SQL, see Connect.

For a tutorial on connecting with free tools, see Connect to and Query Data with Free SQL Tools.

← Quick Start