Connect to Your Federated Database Instance - Preview
On this page
This page guides you through the steps for connecting to the federated database instance to query your Data Lake dataset.
Prerequisites
Before you begin, you must have the following:
An IP address added to the access list of the project that contains the cluster. To learn more, see Add Your Connection IP Address to Your IP Access List.
A database user for your cluster in the project that contains the Federated Database Instance that you want to connect to. To learn more, see Create a Database User for Your Cluster.
A Federated Database Instance on the Atlas cluster mapped to your Atlas Data Lake dataset. To learn more, see Set Up a Federated Database Instance for Your Dataset - Preview.
Procedure
Log in to MongoDB Atlas.
Go to Atlas Data Federation in the Atlas UI.
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.
Get the connection string for your preferred method of connecting.
You can connect using mongosh
, a MongoDB Driver,
and MongoDB Compass. To learn how to get the
connection string for your client, click the tab below for your
connection method.
If you are following the examples in the steps for deploying an
Atlas Data Lake for the sample_mflix.movies
collection and setting up
a Federated Database Instance for this Data Lake dataset, click the
MongoDB Shell tab below to connect using mongosh
.
Click Connect with the MongoDB Shell.
Based on whether or not you have
mongosh
installed, do the following:Click Close.
Click Connect your application.
Select your driver and the driver version.
Copy the provided connection string to your clipboard.
Click Close.
Click Connect using MongoDB Compass.
Based on whether you have MongoDB Compass installed, do the following:
If you already have MongoDB Compass, select your MongoDB Compass version and copy the provided connection string to your clipboard.
If you don't have MongoDB Compass, install MongoDB Compass and follow the steps above to connect with MongoDB Compass.
Click Close.
Connect your client to your Federated Database Instance using the connection string.
Paste and run the connection string in a terminal.
When prompted, enter your database user's password.
To learn more, see Connect with MongoDB Shell.
To learn more, see Driver Examples in the Atlas Connect via Your Application page.
Open MongoDB Compass and paste the connection string into the URI field.
Click Connect.
To learn more, see Connect with MongoDB Compass.
Next Steps
Now that you are connected to your federated database instance, proceed to Run Queries Against Your Data Lake Dataset - Preview.