How to set up MongoDB

πŸ€“ Who can do this? Atlan currently only supports integration with MongoDB Atlas. You will need your MongoDB Organization Owner or Project Owner to complete these steps β€” you may not have access yourself.

Atlan supports the basic authentication method for fetching metadata from MongoDB. This method uses a username and password to fetch metadata.

You will also need the following connection details from your MongoDB database deployment for integration in Atlan:

  • Host name of your MongoDB database
  • Host name of the SQL (or JDBC) endpoint of your MongoDB database
  • Name of the default database
  • Name of the authentication database

Create database user in MongoDB

To add a database user for crawling MongoDB:

  1. Sign in to your MongoDB database.
  2. From the left menu of the Data Services page, under the Security heading, click Database Access.
  3. In the upper right of the Database Access page, click Add New Database User.
  4. In the Add New Database User dialog, enter the following details:
    1. For Authentication Method, keep the default Password.
    2. For Password Authentication, there are two text fields:
      1. Enter a username for the new database user in the top text field β€” for example, atlan_user.
      2. Enter a password in the lower text field or click the Autogenerate Secure Password button to copy and use an auto-generated password.
    3. To assign database privileges to the new user, for Database Privileges, under Built-in Role, click the Add Built-in Role dropdown to select a built-in role:
      1. From the Select role dropdown, click Only read any database to assign read-only access to your MongoDB database(s).
    4. (Optional) By default, users can access all the clusters and federated database instances in the project. To restrict access to specific clusters and federated database instances:
      1. Toggle on Restrict Access to Specific Clusters/Federated Database Instances.
      2. For Grant Access To, check the boxes next to the clusters and federated database instances to which you want to grant access to the new database user.
    5. At the bottom of the dialog, click Add User to finish setup.

Retrieve connection details

To retrieve connection details for crawling MongoDB:

  1. Sign in to your MongoDB database.
  2. From the left menu of the Data Services page, under the Overview heading, click Database.
  3. On the Database Deployment page, navigate to the database deployment you want to crawl in Atlan and click Connect. From the corresponding page, under Connect to your application:
    1. Click Drivers, and then navigate to the Add your connection string into your application code section:
      1. Copy the host name of your MongoDB database from the code snippet and store it in a secure location. For example, in mongodb://myDBReader:D1fficultP%40ssw0rd@mongodb0.example.com:27017/?authSource=admin, mongodb0.example.com will be the MongoDB native host.
      2. Close the dialog box and return to the Connect to your application page.
    2. Click Atlas SQL, and then navigate to the Select your driver heading:
      1. From the driver dropdown, click JDBC Driver.
      2. Navigate to the Get Connection String heading, and then for URL, copy the following connection details and store them in a secure location. As an example, jdbc:mongodb://atlas-sql-64c0b504b658f37cd67dc406-xtapf.a.query.mongodb.net/atlan_db?ssl=trueauth&Source=admin:
        • Copy the host name of the SQL (or JDBC) endpoint of your MongoDB database atlas-sql-64c0b504b658f37cd67dc406-xtapf.a.query.mongodb.net to enter as the SQL interface host name.
        • Copy the name of the default database atlan_db to enter as the Default database.
        • Copy the name of the authentication database admin to enter as the Authentication database.

Related articles

Was this article helpful?
0 out of 0 found this helpful