Docs Menu
Docs Home
/ /
MongoDB Atlas Data Lake
/

Connect to Your Federated Database Instance - Preview

On this page

  • Prerequisites
  • Procedure
  • Next Steps

This page guides you through the steps for connecting to the federated database instance to query your Data Lake dataset.

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.

1
2
  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.

3

Example

If you are connecting to the Federated Database Instance for querying the Atlas Data Lake dataset that you created using the examples, click Connect for DataLake0.

4

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.

  1. Click Connect with the MongoDB Shell.

  2. Based on whether or not you have mongosh installed, do the following:

    • If you already have mongosh, select your installed mongosh version and copy the provided connection string to your clipboard.

    • If you don't have mongosh, install mongosh and copy the provided connection string to your clipboard.

  3. Click Close.

  1. Click Connect your application.

  2. Select your driver and the driver version.

  3. Copy the provided connection string to your clipboard.

  4. Click Close.

  1. Click Connect using MongoDB Compass.

  2. 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.

  3. Click Close.

5
  1. Paste and run the connection string in a terminal.

  2. 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.

  1. Open MongoDB Compass and paste the connection string into the URI field.

  2. Click Connect.

To learn more, see Connect with MongoDB Compass.

Now that you are connected to your federated database instance, proceed to Run Queries Against Your Data Lake Dataset - Preview.

Back

Step 2: Set Up a Federated Database Instance