Advanced Configuration
On this page
This page guides you through setting up your own federated database instance and importing sample data.
Prerequisites
A MongoDB database user with which to connect.
Create a Federated Database Instance
To create a federated database instance and map it to sample data:
In Atlas, go to your federated database instance for your project.
If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.
If it's not already displayed, select your project from the Projects menu in the navigation bar.
In the sidebar, click Data Federation under the Services heading.
The Data Federation page displays.
Connect to a Data Source and add sample data to your federated database instance.
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.
Click Add Sample Data.
Select
AWS S3
from the Filter dropdown if it isn't selected already.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:
Rename the default collection.
Click next to the default collection
VirtualCollection0
to edit its name. For this tutorial, rename your collectionSessions
.Create a second collection.
Click next to the default name
VirtualDatabase0
to add a collection to the database. For this tutorial, name your new collectionUsers
.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 theSessions
collection, and/mflix/users.json
into theUsers
collection.
To learn more about configuring Atlas Data Federation with real data stores, see Define Data Stores for a Federated Database Instance.
Connect to Your 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.