Docs Menu
Docs Home
/
MongoDB 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
  • A MongoDB database user with which to connect.

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

1
  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 Federation under the Services heading.

    The Data Federation page displays.

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. Rename the default collection.

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

  2. Create a second collection.

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

  3. Add data to your virtual database.

    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.

Back

Quick Start